"use client";
import { useId, type ReactNode } from "react";
import type { PaymentLaunchFlow } from "@/app/_hooks/use-payment-launch-flow";
import { LazyStripePaymentDialog } from "./lazy-stripe-payment-dialog";
import { stripePaymentDialogStyles as styles } from "./stripe-payment-dialog.styles";
type PaymentLaunchDialogFlow = Pick<
PaymentLaunchFlow,
| "handleEzpayCancel"
| "handleEzpayConfirm"
| "handleStripeClose"
| "handleStripeConfirmed"
| "isConfirmingEzpay"
| "shouldShowEzpayConfirmDialog"
| "shouldShowStripeDialog"
| "stripeClientSecret"
>;
export interface PaymentLaunchDialogsProps {
currentOrderId: string | null;
externalCheckoutAnalyticsKey: string;
ezpayDescription: ReactNode;
launch: PaymentLaunchDialogFlow;
stripeReturnPath?: string;
}
export function PaymentLaunchDialogs({
currentOrderId,
externalCheckoutAnalyticsKey,
ezpayDescription,
launch,
stripeReturnPath,
}: PaymentLaunchDialogsProps) {
return (
<>
{launch.shouldShowEzpayConfirmDialog ? (
{description}
Order No. {orderId}