{{-- Responsive payment checkout shell: bottom sheet on mobile, centered modal on desktop. Audiences: - buyer (default): public ticket buyers, donors, shoppers — self-serve checkout - operator: signed-in staff flows such as wallet top-up Optional overrides: $sheetTitle, $sheetSubtitle, $sheetFooter, $sheetAria, $iframeTitle Requires Alpine ancestor with: showSheet (bool), checkoutUrl (string). Paystack (checkout.paystack.com) sends X-Frame-Options: SAMEORIGIN and cannot be embedded. Same-origin URLs (e.g. MoMo waiting pages) still load in an iframe. External checkouts open in a named window, with an in-sheet Continue CTA as a user-gesture fallback when the popup is blocked after an async fetch. --}} @php $audience = $audience ?? 'buyer'; $defaults = match ($audience) { 'operator' => [ 'title' => 'Complete payment', 'subtitle' => null, 'aria' => 'Complete payment', 'iframe' => 'Payment checkout', 'footer' => null, ], default => [ 'title' => 'Complete your payment', 'subtitle' => 'Pay securely. You\'ll get a confirmation when it succeeds.', 'aria' => 'Complete your payment', 'iframe' => 'Secure payment checkout', 'footer' => 'Your payment is processed securely. Do not close this window until finished.', ], }; $sheetTitle = $sheetTitle ?? $defaults['title']; $sheetSubtitle = $sheetSubtitle ?? $defaults['subtitle']; $sheetAria = $sheetAria ?? $defaults['aria']; $iframeTitle = $iframeTitle ?? $defaults['iframe']; $sheetFooter = $sheetFooter ?? $defaults['footer']; @endphp @once @endonce