import { BaseEmbed } from "./base-embed"; import type { CardEmbedType, EmbedCallbacks, EmbedConfiguration, EmbedSyncConfiguration, EmbedTimeoutConfiguration } from "./embed-configuration"; import type { Environment } from "./environment"; import type { Styles } from "./styles"; type RequireAtLeastOne = Keys extends keyof T ? Required> & Partial> : never; export type CardEmbedIframeConfigurations = RequireAtLeastOne<{ pan?: EmbedConfiguration; cvv?: EmbedConfiguration; expMonth?: EmbedConfiguration; expYear?: EmbedConfiguration; }>; export type CardEmbedCallbacks = { onCopy?: (embedType: CardEmbedType, success: boolean) => void; }; export type CardEmbedConfiguration = EmbedCallbacks & CardEmbedCallbacks & EmbedSyncConfiguration & EmbedTimeoutConfiguration; export declare class CardEmbed extends BaseEmbed { private isRevealed; private readonly onCopy?; private revealCardDetailsPromise?; private readonly revealedIframes; private readonly visibleIframes; private copyMessageListenerAttached; constructor(sessionToken: string, environment: Environment, apiUrl: string, configuration?: CardEmbedConfiguration); /** * Toggles all mounted card fields between masked and revealed states. * * The first reveal requests card details for each mounted field. If no * fields are mounted or the operation is aborted, it resolves without * changing the masking state. * * @returns A `Promise` that resolves to `true` when this call * sends a toggle message to at least one iframe and updates the SDK's * local masking state, or `false` when no toggle message is sent. This * result does not represent acknowledgement from the iframe. * @throws `CardDetailsRequestError` If a card iframe reports an * error while requesting card details or does not respond before the SDK * timeout. */ toggleMasking(): Promise; /** * @throws `EmbedMountError` If the iframe does not render before the SDK * timeout. */ mountPan(target: Element | string, styles?: Styles): Promise; /** * @throws `EmbedMountError` If the iframe does not render before the SDK * timeout. */ mountCvv(target: Element | string, styles?: Styles): Promise; /** * @throws `EmbedMountError` If the iframe does not render before the SDK * timeout. */ mountExpMonth(target: Element | string, styles?: Styles): Promise; /** * @throws `EmbedMountError` If the iframe does not render before the SDK * timeout. */ mountExpYear(target: Element | string, styles?: Styles): Promise; /** * @throws `EmbedMountError` If any iframe does not render before the SDK * timeout. */ mount(configuration: CardEmbedIframeConfigurations): Promise; unmount(): Promise; private revealCardDetails; private createCopyMessageListener; private removeCopyMessageListener; private handleCopyMessage; } export {};