import { Appearance, Environment, InitialValues } from '../../../types/checkout/CheckoutConfig.type'; import { ApplePayData, FormData } from '../../../types/common/FormData.type'; import { Locale } from '../../../types/common/Locale.type.ts'; import { Component } from '../../Component'; export declare const browserInfo: { userAgent: string; }; export interface FormOptions { apiKey: string; /** * Resolves to `true` when the SDK reported a success or a required action to * the merchant. A decline or an error resolves to `false`. */ onSubmit: (data: { formData: FormData | null; applePayData?: ApplePayData; }) => Promise; locale?: Locale | null; errorMsg?: string; container: HTMLElement; environment: Environment; appearance?: Appearance; onLoadingStateChange?: (isLoading: boolean) => void; paymentId?: string; checkoutKey?: string; checkoutDetails?: { amount: number; currency: string; countryCode: string; }; initialValues?: InitialValues; supportedPaymentMethods?: { card?: boolean; paypal?: boolean; applePay?: boolean; [key: string]: boolean | undefined; }; vgsJwt?: string; } export declare class Form extends Component { private options; private formManager; private checkoutProfile; private translation; private focusManager; private componentManager; private eventHandler; private stateCoordinator; private uiManager; private vgsService?; private vgsJwt?; private vgsCardResult?; private isCardCaptureUnavailable; private vgsMountGeneration; private isDestroyed; constructor(options: FormOptions); private _getFormStateData; private initializeForm; /** * Card capture cannot run, so the form drops the service and renders a * message where the card fields would be. It never falls back to an input * the merchant page could read. */ private failCardCaptureClosed; /** * Clearing the property invalidates the pending continuations, and the * service still has to be torn down or its form, fields and callbacks * outlive the transition. */ private dropVgsService; /** * Undoes `failCardCaptureClosed` once card capture works again. */ private recoverCardCapture; private renderFormComponents; private updateFormUI; /** * Infers cardholder name from address fields (first + last name). * Uses billing address if available, otherwise shipping address. */ private inferCardholderName; /** * Infers address data based on field configuration. * If billing fields are disabled but shipping is enabled, copies shipping to billing. * If shipping fields are disabled but billing is enabled, copies billing to shipping. */ private inferAddresses; private handleVgsStateChange; private handleSubmit; private handleSubmitError; private handlePaypalSubmit; private handleApplePaySubmit; setErrorMessage(message: string): this; clearErrorMessage(): this; updateAppearance(props: { appearance?: Appearance; locale?: Locale; }): void; destroy(): void; associatePayment(paymentId: string, checkoutKey: string, supportedPaymentMethods: { card?: boolean; paypal?: boolean; applePay?: boolean; [key: string]: boolean | undefined; }, checkoutDetails: { amount: number; currency: string; countryCode: string; }, vgsJwt?: string): void; } //# sourceMappingURL=Form.d.ts.map