import type { APICallResult } from '../native/NativeCheckoutModule'; import type { Error as CheckoutError } from './error/error'; import type { TokenizationResult } from './misc/token'; /** * Event callbacks for component lifecycle */ export type ComponentCallbacks = { /** * Called when payment method is ready */ onReady?: (paymentMethod: string) => void; /** * Triggered when the payment method is changed and any new updates */ onChange?: (paymentMethod: string, isValid: boolean, isAvailable: boolean) => void; /** * Triggered when the payment method is submitted */ onSubmit?: (paymentMethod: string) => void; /** * Triggered when an item can be tokenized, providing the token details */ onTokenized?: (tokenizationResult: TokenizationResult) => Promise<{ continue: boolean; error: string | null; }>; /** * Triggered when the payment is successful */ onSuccess?: (paymentMethod: string, paymentID: string) => void; /** * Triggered when an error occurs during payment */ onError?: (error: CheckoutError) => void; /** * Triggered when the payment method requests to handle submit */ handleSubmit?: (sessionData: string) => Promise; }; //# sourceMappingURL=callbacks.d.ts.map