/** * Theme for the Stripe wallet button appearance. * Matches Apple Pay button styles: 'black', 'white', or 'white-outline' * @default "black" */ export type WalletButtonTheme = "black" | "white" | "white-outline"; /** Host checks whether the wallet purchase path is usable for this package. Resolves false on any error. */ export type WalletPurchasePrepare = (selectedPackageId: string) => Promise; /** Host starts the wallet purchase. Must be invoked synchronously from the click so Safari keeps the user activation. Resolves when the attempt settles (success, cancel, or error). */ export type WalletPurchaseStart = (selectedPackageId: string) => Promise; export type WalletButtonRender = (node: HTMLElement, params: { selectedPackageId: string; onReady?: (walletButtonAvailable?: boolean) => void; walletButtonTheme?: WalletButtonTheme; }) => { destroy?: () => void; update?: (updateParams: { selectedPackageId: string; onReady?: (walletButtonAvailable?: boolean) => void; walletButtonTheme?: WalletButtonTheme; }) => void; };