import { Environment } from '../types/checkout/CheckoutConfig.type'; import { CardCaptureUnavailableReason } from '../types/telemetry/TelemetryEvents.type'; import { BaseElement } from './BaseElement'; import { VgsCardPayload } from './types/CardPayload.type'; export type { VgsCardPayload }; export declare const CARD_CAPTURE_UNAVAILABLE_ERROR = "Card capture is unavailable: no tokenization session"; /** * `pending` is the state every element mounts in: the merchant mounts before * `associatePayment()` has fetched the tokenization session, so "no session * yet" must not look like "no session at all". Only `unavailable` is the * fail-closed state that reports an error. `unsupported` is a payment that * does not offer card at all, which draws nothing. */ export type CardCaptureState = 'pending' | 'vgs' | 'unavailable' | 'unsupported'; export declare class CardElement extends BaseElement { private _environment; private _captureState; private _mountContainer; private _vgsAdapter; private _vgsJwt; private _reportedUnavailable; private _unavailableReason; get isVgsMode(): boolean; /** Lets a caller tell "card is not offered" from "card capture failed". */ get captureState(): CardCaptureState; setEnvironment(env: Environment): void; setVgsJwt(jwt: string): void; /** * Called once the payment is known to carry no tokenization session. This is * the only way into the fail-closed state, so a merchant who mounts before * associating never sees the error. */ markCaptureUnavailable(reason?: CardCaptureUnavailableReason): void; /** * The payment does not offer card, so the element drops its session and * draws nothing. It shows no error, because nothing failed — but it must * not keep a JWT that would tokenize the new payment, and it must not leave * a card-sized placeholder on a checkout that has no card block. */ resetCardCapture(): void; mount(target: string | HTMLElement): void; unmount(): void; protected render(): void; private clearBody; /** * Waiting for the tokenization session. This is a neutral placeholder: it * carries no input and reports no error, because nothing has failed yet. */ private renderPendingPlaceholder; /** * Fail closed: an element without a tokenization session shows a message. * It never renders a card input into the merchant page. */ private renderUnavailableNotice; focus(): void; focusField(field: 'cardNumber' | 'cardExpiry' | 'cardCvv'): void; destroy(): void; setTheme(theme: Record): void; resetTheme(theme: Record): void; protected getCss(): string; protected getValue(): { number: string; expiry: string; cvv: string; }; getPayload(): Promise; protected getIsValid(): boolean; protected getError(): string | null; } //# sourceMappingURL=CardElement.d.ts.map