import EventEmitter2 from "eventemitter2"; export type Env = "production" | "sandbox" | "development" | "local"; export type TVariant = "HEADLESS" | "EXPRESS" | "STANDARD"; export type TPaymentMethod = "CARD" | "IDEAL" | "TWINT" | "VIPPS" | "APPLE_PAY" | "GOOGLE_PAY" | "SEPA" | "SEPADD" | "OPENBANKING"; interface ITheme { accentColor: string; accentColorContrast: string; borderRadius: string; brandColor: string; brandColorContrast: string; fontFamily: string; logoUrl: string; } export default class Checkout extends EventEmitter2 { protected checkoutId: string; protected container: HTMLElement | null; protected containerId: string | null; protected env: Env; protected url: string | null; protected iframe: HTMLIFrameElement | null; protected small: boolean; protected height: string | undefined; protected formOnly: boolean; protected walletsOnly: boolean; protected language: string; protected darkMode: boolean; protected windowProxy: WindowProxy | null; protected variant: TVariant; protected paymentMethods: TPaymentMethod[]; paymentMethod: string | undefined; protected style: { minWidth: string; minHeight: string; }; constructor({ checkoutId, container, containerId, env, url, small, height, /** * @deprecated Use variant = 'HEADLESS' instead */ formOnly, /** * @deprecated Use variant = 'EXPRESS' instead */ walletsOnly, variant, language, darkMode, paymentMethods, }: { checkoutId: string; container?: HTMLElement; containerId?: string; env?: Env; url?: string | null; small?: boolean; height?: string; /** * @deprecated Use variant = 'HEADLESS' instead */ formOnly?: boolean; /** * @deprecated Use variant = 'EXPRESS' instead */ walletsOnly?: boolean; language?: string; variant?: TVariant; darkMode?: boolean; paymentMethods?: TPaymentMethod[]; }); private validatePaymentMethods; private getQueryParameters; private getBaseUrl; private getCheckoutUrl; private createIframe; private handleMessage; private attachEventListeners; private resizeIframeHeight; private resetIframeHeight; private resize; private hideWalletsContainer; dispose(): void; render(): void; isReadyToSubmit(): boolean; /** * @param preSubmitCallback Function to be called before submitting the payment, * if pre submit fails, the payment will not be submitted * @returns preSubmitCallback value, if any */ submit(preSubmitCallback?: () => Promise): Promise; setTheme(theme: ITheme): void; } export {}; //# sourceMappingURL=checkout.d.ts.map