{
+ const store = $store.ladillPayCheckout;
+ if (!store) return;
store.sync(
- showSheet,
- typeof checkoutUrl !== 'undefined' ? checkoutUrl : '',
- typeof accessCode !== 'undefined' ? accessCode : '',
- typeof returnUrl !== 'undefined' ? returnUrl : ''
+ !!showSheet,
+ (typeof checkoutUrl === 'undefined' || checkoutUrl === null) ? '' : String(checkoutUrl),
+ (typeof accessCode === 'undefined' || accessCode === null) ? '' : String(accessCode),
+ (typeof returnUrl === 'undefined' || returnUrl === null) ? '' : String(returnUrl)
);
- }
- "
- @keydown.escape.window="if (showSheet) showSheet = false"
- @ladill-pay-cancelled.window="showSheet = false"
- class="fixed inset-0 z-[9999] flex items-end justify-center md:items-center md:p-6"
- role="dialog"
- aria-modal="true"
- :aria-hidden="(!showSheet).toString()"
- aria-label="{{ $sheetAria }}">
+ };
+ $watch('showSheet', () => runSync());
+ $watch('checkoutUrl', () => runSync());
+ $watch('accessCode', () => runSync());
+ $watch('returnUrl', () => runSync());
+ $nextTick(() => runSync());
+ "
+ x-show="showSheet"
+ x-cloak
+ data-ladill-pay-sheet
+ x-effect="document.documentElement.style.overflow = showSheet ? 'hidden' : ''"
+ @keydown.escape.window="if (showSheet) showSheet = false"
+ @ladill-pay-cancelled.window="showSheet = false"
+ class="fixed inset-0 z-[9999] flex items-end justify-center md:items-center md:p-6"
+ role="dialog"
+ aria-modal="true"
+ :aria-hidden="(!showSheet).toString()"
+ aria-label="{{ $sheetAria }}">
-