import { IkasCheckoutSettings, IkasOrderAddress } from "../../../../storefront-models/src"; /** * Creates a new empty order address object with default values. * * @ai-category OrderAddress, Order * @ai-related getOrderAddressText, getOrderAddressValidationResult, isValidOrderAddress * * @returns A new IkasOrderAddress with all fields initialized to empty strings, null, or false. * * @example * ```typescript * import { createOrderAddress } from "@ikas/bp-storefront"; * * const address = createOrderAddress(); * address.firstName = "John"; * address.lastName = "Doe"; * address.addressLine1 = "123 Main St"; * ``` */ export declare function createOrderAddress(): IkasOrderAddress; /** * Builds a comma-separated text representation of an order address. * * @ai-category OrderAddress, Order * @ai-related createOrderAddress, getOrderAddressValidationResult, isValidOrderAddress * * @param address - The order address to convert to a display string. * @returns A comma-separated string containing the non-empty address fields (address lines, postal code, region, district, city, state, and country). * * @example * ```typescript * import { getOrderAddressText } from "@ikas/bp-storefront"; * * const text = getOrderAddressText(order.shippingAddress); * // "123 Main St, 34000, Istanbul, Turkey" * ``` */ export declare function getOrderAddressText(address: IkasOrderAddress): string; /** * Validates each field of an order address against checkout settings and returns per-field results. * * @ai-category OrderAddress, Order * @ai-related isValidOrderAddress, createOrderAddress, getOrderAddressText * * @param address - The order address to validate. * @param checkoutSettings - The checkout settings that determine which fields are mandatory, optional, or hidden. * @param isDistrictRequired - Whether the district field is required for the selected country/state. * @returns An object mapping each address field name to a boolean indicating whether it passes validation. * * @example * ```typescript * import { getOrderAddressValidationResult } from "@ikas/bp-storefront"; * * const result = getOrderAddressValidationResult(address, checkoutSettings, true); * if (!result.firstName) { * console.log("First name is required"); * } * ``` */ export declare function getOrderAddressValidationResult(address: IkasOrderAddress, checkoutSettings: IkasCheckoutSettings, isDistrictRequired: boolean): IkasOrderAddressValidationResult; /** * Checks whether all fields of an order address pass validation. * * @ai-category OrderAddress, Order * @ai-related getOrderAddressValidationResult, createOrderAddress, getOrderAddressText * * @param address - The order address to validate. * @param checkoutSettings - The checkout settings that determine field requirements. * @param isDistrictRequired - Whether the district field is required for the selected country/state. * @returns True if every address field passes validation, false otherwise. * * @example * ```typescript * import { isValidOrderAddress } from "@ikas/bp-storefront"; * * if (isValidOrderAddress(address, checkoutSettings, true)) { * // Proceed to next checkout step * } * ``` */ export declare function isValidOrderAddress(address: IkasOrderAddress, checkoutSettings: IkasCheckoutSettings, isDistrictRequired: boolean): boolean; export type IkasOrderAddressValidationResult = { firstName: boolean; lastName: boolean; addressLine1: boolean; country: boolean; state: boolean; city: boolean; district: boolean; phone: boolean; postalCode: boolean; identityNumber: boolean; };