import { IkasFormAttributeItem, RegisterForm } from "../../../../storefront-models/src"; /** * Initializes the registration form with default field values, labels, placeholders, and customer attributes. * * @ai-category Registration, Form, Initialization * @ai-related submitRegisterForm, setRegisterFormFirstName, setRegisterFormLastName, setRegisterFormEmail, setRegisterFormPassword, setRegisterFormPhone * * @param registerForm - The register form instance to initialize with default values. * @returns void * * @example * ```typescript * import { initRegisterForm } from "@ikas/bp-storefront"; * * initRegisterForm(registerForm); * ``` */ export declare function initRegisterForm(registerForm: RegisterForm): void; /** * Sets the value of a text-type custom attribute on the registration form. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormDateAttribute, setRegisterFormDateTimeAttribute, setRegisterFormChoiceAttribute, setRegisterFormNumericAttribute, setRegisterFormBooleanAttribute, setRegisterFormMultipleChoiceAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - The text value to assign to the attribute. * @returns void * * @example * ```typescript * import { setRegisterFormTextAttribute } from "@ikas/bp-storefront"; * * setRegisterFormTextAttribute(registerForm, attribute, "some text value"); * ``` */ export declare function setRegisterFormTextAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: string): void; /** * Sets the value of a datetime-type custom attribute on the registration form. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormTextAttribute, setRegisterFormDateAttribute, setRegisterFormChoiceAttribute, setRegisterFormNumericAttribute, setRegisterFormBooleanAttribute, setRegisterFormMultipleChoiceAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - The datetime string value to assign to the attribute. * @returns void * * @example * ```typescript * import { setRegisterFormDateTimeAttribute } from "@ikas/bp-storefront"; * * setRegisterFormDateTimeAttribute(registerForm, attribute, "2024-06-15T10:30:00"); * ``` */ export declare function setRegisterFormDateTimeAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: string): void; /** * Sets the value of a date-type custom attribute on the registration form. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormTextAttribute, setRegisterFormDateTimeAttribute, setRegisterFormChoiceAttribute, setRegisterFormNumericAttribute, setRegisterFormBooleanAttribute, setRegisterFormMultipleChoiceAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - The date string value to assign to the attribute. * @returns void * * @example * ```typescript * import { setRegisterFormDateAttribute } from "@ikas/bp-storefront"; * * setRegisterFormDateAttribute(registerForm, attribute, "2024-06-15"); * ``` */ export declare function setRegisterFormDateAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: string): void; /** * Sets the value of a single-choice custom attribute on the registration form. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormTextAttribute, setRegisterFormDateAttribute, setRegisterFormDateTimeAttribute, setRegisterFormNumericAttribute, setRegisterFormBooleanAttribute, setRegisterFormMultipleChoiceAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - The selected choice option value (typically an option ID). * @returns void * * @example * ```typescript * import { setRegisterFormChoiceAttribute } from "@ikas/bp-storefront"; * * setRegisterFormChoiceAttribute(registerForm, attribute, "optionId123"); * ``` */ export declare function setRegisterFormChoiceAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: string): void; /** * Sets the value of a numeric-type custom attribute on the registration form, ensuring only valid integers are accepted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormTextAttribute, setRegisterFormDateAttribute, setRegisterFormDateTimeAttribute, setRegisterFormChoiceAttribute, setRegisterFormBooleanAttribute, setRegisterFormMultipleChoiceAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - The numeric string value to assign; non-integer trailing characters are stripped. * @returns void * * @example * ```typescript * import { setRegisterFormNumericAttribute } from "@ikas/bp-storefront"; * * setRegisterFormNumericAttribute(registerForm, attribute, "42"); * ``` */ export declare function setRegisterFormNumericAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: string): void; /** * Sets the checked state of a boolean-type custom attribute on the registration form. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormTextAttribute, setRegisterFormDateAttribute, setRegisterFormDateTimeAttribute, setRegisterFormChoiceAttribute, setRegisterFormNumericAttribute, setRegisterFormMultipleChoiceAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - The boolean value indicating whether the attribute is checked. * @returns void * * @example * ```typescript * import { setRegisterFormBooleanAttribute } from "@ikas/bp-storefront"; * * setRegisterFormBooleanAttribute(registerForm, attribute, true); * ``` */ export declare function setRegisterFormBooleanAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: boolean): void; /** * Sets the selected option IDs for a multiple-choice custom attribute on the registration form. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormTextAttribute, setRegisterFormDateAttribute, setRegisterFormDateTimeAttribute, setRegisterFormChoiceAttribute, setRegisterFormNumericAttribute, setRegisterFormBooleanAttribute * * @param registerForm - The register form instance containing the attribute. * @param attribute - The form attribute item to update. * @param value - An array of selected option IDs. * @returns void * * @example * ```typescript * import { setRegisterFormMultipleChoiceAttribute } from "@ikas/bp-storefront"; * * setRegisterFormMultipleChoiceAttribute(registerForm, attribute, ["optionId1", "optionId2"]); * ``` */ export declare function setRegisterFormMultipleChoiceAttribute(registerForm: RegisterForm, attribute: IkasFormAttributeItem, value: string[]): void; /** * Sets the first name field on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormLastName, setRegisterFormEmail, setRegisterFormPassword, setRegisterFormPhone, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - The first name value to set. * @returns void * * @example * ```typescript * import { setRegisterFormFirstName } from "@ikas/bp-storefront"; * * setRegisterFormFirstName(registerForm, "Jane"); * ``` */ export declare function setRegisterFormFirstName(registerForm: RegisterForm, value: string): void; /** * Sets the last name field on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormFirstName, setRegisterFormEmail, setRegisterFormPassword, setRegisterFormPhone, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - The last name value to set. * @returns void * * @example * ```typescript * import { setRegisterFormLastName } from "@ikas/bp-storefront"; * * setRegisterFormLastName(registerForm, "Doe"); * ``` */ export declare function setRegisterFormLastName(registerForm: RegisterForm, value: string): void; /** * Sets the email field on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormFirstName, setRegisterFormLastName, setRegisterFormPassword, setRegisterFormPhone, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - The email address value to set. * @returns void * * @example * ```typescript * import { setRegisterFormEmail } from "@ikas/bp-storefront"; * * setRegisterFormEmail(registerForm, "jane.doe@example.com"); * ``` */ export declare function setRegisterFormEmail(registerForm: RegisterForm, value: string): void; /** * Sets the password field on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormFirstName, setRegisterFormLastName, setRegisterFormEmail, setRegisterFormPhone, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - The password value to set. * @returns void * * @example * ```typescript * import { setRegisterFormPassword } from "@ikas/bp-storefront"; * * setRegisterFormPassword(registerForm, "securePassword123"); * ``` */ export declare function setRegisterFormPassword(registerForm: RegisterForm, value: string): void; /** * Sets the phone number field on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormFirstName, setRegisterFormLastName, setRegisterFormEmail, setRegisterFormPassword, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - The phone number value to set. * @returns void * * @example * ```typescript * import { setRegisterFormPhone } from "@ikas/bp-storefront"; * * setRegisterFormPhone(registerForm, "+1234567890"); * ``` */ export declare function setRegisterFormPhone(registerForm: RegisterForm, value: string): void; /** * Sets the marketing consent acceptance flag on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormIsMembershipAgreementAccepted, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - Whether the customer accepts marketing communications. * @returns void * * @example * ```typescript * import { setRegisterFormIsMarketingAccepted } from "@ikas/bp-storefront"; * * setRegisterFormIsMarketingAccepted(registerForm, true); * ``` */ export declare function setRegisterFormIsMarketingAccepted(registerForm: RegisterForm, value: boolean): void; /** * Sets the membership agreement acceptance flag on the registration form and re-validates if the form has been submitted. * * @ai-category Registration, Form, Customer, Validation * @ai-related setRegisterFormIsMarketingAccepted, initRegisterForm, submitRegisterForm * * @param registerForm - The register form instance to update. * @param value - Whether the customer accepts the membership agreement. * @returns void * * @example * ```typescript * import { setRegisterFormIsMembershipAgreementAccepted } from "@ikas/bp-storefront"; * * setRegisterFormIsMembershipAgreementAccepted(registerForm, true); * ``` */ export declare function setRegisterFormIsMembershipAgreementAccepted(registerForm: RegisterForm, value: boolean): void; /** * Validates and submits the registration form, creating a new customer account if all fields pass validation. * * @ai-category Registration, Form, Customer, Validation * @ai-related initRegisterForm, setRegisterFormFirstName, setRegisterFormLastName, setRegisterFormEmail, setRegisterFormPassword, setRegisterFormPhone, setRegisterFormIsMarketingAccepted, setRegisterFormIsMembershipAgreementAccepted * * @param registerForm - The register form instance to validate and submit. * @returns A promise that resolves to `true` if registration succeeded, or `false` if validation failed or the API request was unsuccessful. * * @example * ```typescript * import { submitRegisterForm } from "@ikas/bp-storefront"; * * const success = await submitRegisterForm(registerForm); * if (success) { * // Registration was successful * } * ``` */ export declare function submitRegisterForm(registerForm: RegisterForm): Promise;