import { IkasAttributeTableCellValue, IkasProductAttributeValue } from "../../../../storefront-models/src"; /** * Parses and returns the table cell values from a product attribute value's JSON string. * * @ai-category ProductAttribute * @ai-related getIkasProductAttrributeProductIds, getIkasProductAttributeProducts * * @param value - The product attribute value containing a JSON-encoded table value. * @returns An array of table cell values, or an empty array if parsing fails or value is empty. * * @example * ```typescript * import { getIkasProductAttributeTableValue } from "@ikas/bp-storefront"; * const tableCells = getIkasProductAttributeTableValue(attributeValue); * tableCells?.forEach(cell => console.log(cell)); * ``` */ export declare function getIkasProductAttributeTableValue(value: IkasProductAttributeValue): IkasAttributeTableCellValue[] | undefined; /** * Extracts and returns the product IDs from a PRODUCT-type attribute value's JSON string. * NOTE: the export name really is misspelled — "Attrribute" with a double r. It is kept as-is because * renaming a published export would break every theme that imports it, so import it VERBATIM; the * correctly spelled `getIkasProductAttributeProductIds` does not exist and will not compile. This is * not a documentation typo to report or "fix". In the blueprint editor the display alias is * `getProductIds`, which hides the misspelling; only direct TypeScript imports see it. * * @ai-category ProductAttribute, Product * @ai-related getIkasProductAttributeTableValue, getIkasProductAttributeProducts * * @param value - The product attribute value containing a JSON-encoded array of product IDs. * @returns An array of product ID strings, or an empty array if the attribute is not of type PRODUCT or parsing fails. * * @example * ```typescript * import { getIkasProductAttrributeProductIds } from "@ikas/bp-storefront"; * const productIds = getIkasProductAttrributeProductIds(attributeValue); * console.log(productIds); // ["id1", "id2"] * ``` */ export declare function getIkasProductAttrributeProductIds(value: IkasProductAttributeValue): string[]; /** * Fetches and returns the full product objects referenced by a PRODUCT-type attribute value. * * @ai-category ProductAttribute, Product * @ai-related getIkasProductAttrributeProductIds, getIkasProductAttributeTableValue * * @param value - The product attribute value containing product IDs to look up. * @returns A promise that resolves to an array of product objects, or an empty array if the attribute is not of type PRODUCT or the fetch fails. * * @example * ```typescript * import { getIkasProductAttributeProducts } from "@ikas/bp-storefront"; * const products = await getIkasProductAttributeProducts(attributeValue); * products.forEach(product => console.log(product.name)); * ``` */ export declare function getIkasProductAttributeProducts(value: IkasProductAttributeValue): Promise;