import { Environment } from '../../types/checkout/CheckoutConfig.type'; import { CardTypes } from '../../types/payment/CardType.type'; export interface VGSFieldError { message: string; code: number; details: Record; description: string; } export interface VGSFieldState { isDirty: boolean; isFocused: boolean; isTouched: boolean; isValid: boolean; isEmpty: boolean; cardType?: string; last4?: string; bin?: string; name?: string; errorMessages?: string[]; errors?: VGSFieldError[]; } export interface VGSFormState { [fieldName: string]: VGSFieldState | undefined; } export type VGSStateCallback = (state: VGSFormState) => void; export interface VGSCardUpdateValue { field_name: string; old_value: string | number; new_value: string | number; } export interface VGSCardResult { cardId: string; expMonth: string; cvc: string; expYear: string; name: string; updatedValues?: VGSCardUpdateValue[]; } export interface VGSFieldCss { [key: string]: string | { [key: string]: string; }; } export interface VGSFieldsCssMap { cardNumber?: VGSFieldCss; cardExpiry?: VGSFieldCss; cardCvv?: VGSFieldCss; cardholderName?: VGSFieldCss; } interface VGSField { promise: Promise; on(event: string, callback: (data: any) => void): void; update(options: { css?: any; }): void; focus(): void; } interface VGSForm { field(selector: string, options: any): VGSField; cardNumberField(selector: string, options: any): VGSField; cardExpirationDateField(selector: string, options: any): VGSField; cardCVCField(selector: string, options: any): VGSField; cardholderNameField(selector: string, options: any): VGSField; createCard(config: any, onSuccess: (status: number, data: any) => void, onError: (errors: any) => void): void; submit(path: string, options: any, onSuccess: (status: number, data: any) => void, onError: (errors: any) => void): void; } export declare class VGSCollectService { private vgsForm; private fields; private _namedFields; private readyResolve?; private readyPromise; private _containerSelectors; private _fieldMountTimestamps; private environment?; constructor(); init(environment: Environment): Promise; createForm(collect: any, stateCallback: VGSStateCallback): VGSForm; whenReady(): Promise; mountCardFields(containers: { cardNumber?: string; cardExpiry?: string; cardCvv?: string; cardholderName?: string; }, css: VGSFieldsCssMap, translations: { cardNumber: string; cardExpiry: string; cardCvv: string; cardholderName: string; }, onCardBrandChange?: (cardBrand: CardTypes) => void): void; updateFieldsCss(css: VGSFieldsCssMap): void; waitForFieldsReady(): Promise; focusField(fieldName: 'cardNumber' | 'cardExpiry' | 'cardCvv' | 'cardholderName'): void; createCard(vgsJwt: string): Promise; private patchCard; private static extractCardResult; private static extractObservabilityMeta; destroy(): void; static mapCardType(vgsCardType?: string): CardTypes; } export {}; //# sourceMappingURL=VGSCollectService.d.ts.map