import { AccountInfoForm } from "../../../../storefront-models/src"; /** * Initializes the account info form by loading the current customer's first name, last name, and phone from the store and setting default field states. * * @ai-category AccountInfo, Form, Validation * @ai-related setAccountInfoFormFirstName, setAccountInfoFormLastName, setAccountInfoFormPhone, submitAccountInfoForm * * @param accountInfoForm - The AccountInfoForm instance to initialize. * @returns A promise that resolves once the form fields have been populated with customer data. * * @example * ```typescript * import { initAccountInfoForm } from "@ikas/bp-storefront"; * await initAccountInfoForm(accountInfoForm); * ``` */ export declare function initAccountInfoForm(accountInfoForm: AccountInfoForm): Promise; /** * Sets the first name field on the account info form and re-validates if the form has already been submitted. * * @ai-category AccountInfo, Form * @ai-related setAccountInfoFormLastName, setAccountInfoFormPhone, initAccountInfoForm, submitAccountInfoForm * * @param accountInfoForm - The AccountInfoForm instance to update. * @param value - The new first name value. * @returns void * * @example * ```typescript * import { setAccountInfoFormFirstName } from "@ikas/bp-storefront"; * setAccountInfoFormFirstName(accountInfoForm, "Jane"); * ``` */ export declare function setAccountInfoFormFirstName(accountInfoForm: AccountInfoForm, value: string): void; /** * Sets the last name field on the account info form and re-validates if the form has already been submitted. * * @ai-category AccountInfo, Form * @ai-related setAccountInfoFormFirstName, setAccountInfoFormPhone, initAccountInfoForm, submitAccountInfoForm * * @param accountInfoForm - The AccountInfoForm instance to update. * @param value - The new last name value. * @returns void * * @example * ```typescript * import { setAccountInfoFormLastName } from "@ikas/bp-storefront"; * setAccountInfoFormLastName(accountInfoForm, "Doe"); * ``` */ export declare function setAccountInfoFormLastName(accountInfoForm: AccountInfoForm, value: string): void; /** * Sets the phone number field on the account info form and re-validates if the form has already been submitted. * * @ai-category AccountInfo, Form * @ai-related setAccountInfoFormFirstName, setAccountInfoFormLastName, initAccountInfoForm, submitAccountInfoForm * * @param accountInfoForm - The AccountInfoForm instance to update. * @param value - The new phone number value. * @returns void * * @example * ```typescript * import { setAccountInfoFormPhone } from "@ikas/bp-storefront"; * setAccountInfoFormPhone(accountInfoForm, "+1234567890"); * ``` */ export declare function setAccountInfoFormPhone(accountInfoForm: AccountInfoForm, value: string): void; /** * Sets the marketing acceptance field on the account info form and re-validates if the form has already been submitted. * * @ai-category AccountInfo, Form * @ai-related setAccountInfoFormFirstName, setAccountInfoFormLastName, setAccountInfoFormPhone, initAccountInfoForm, submitAccountInfoForm * * @param accountInfoForm - The AccountInfoForm instance to update. * @param value - The new marketing acceptance value. * @returns void * * @example * ```typescript * import { setAccountInfoFormIsMarketingAccepted } from "@ikas/bp-storefront"; * setAccountInfoFormIsMarketingAccepted(accountInfoForm, true); * ``` */ export declare function setAccountInfoFormIsMarketingAccepted(accountInfoForm: AccountInfoForm, value: boolean): void; /** * Validates and submits the account info form, saving the updated customer first name, last name, and phone to the server. * * @ai-category AccountInfo, Form, Validation * @ai-related initAccountInfoForm, setAccountInfoFormFirstName, setAccountInfoFormLastName, setAccountInfoFormPhone * * @param accountInfoForm - The AccountInfoForm instance to validate and submit. * @returns A promise that resolves to `true` if the submission succeeded, or `false` if validation failed or the save request failed. * * @example * ```typescript * import { submitAccountInfoForm } from "@ikas/bp-storefront"; * const success = await submitAccountInfoForm(accountInfoForm); * if (success) { * console.log("Account info updated successfully."); * } * ``` */ export declare function submitAccountInfoForm(accountInfoForm: AccountInfoForm): Promise;