import { type default as Analytics } from '@farfetch/blackout-analytics'; import type { ProductEntity, ProductEntityDenormalized } from '../../entities/types/index.js'; import type { StoreState } from '../../types/index.js'; /** * Returns the different product categories separated with a `/`. * * @param product - The product object. * * @returns String with all category names joined with a '/' character. */ export declare const getCategory: (product: ProductEntityDenormalized | undefined) => string; /** * Returns the product brand name. * * @param state - The current application state. * @param product - The product object. * * @returns The brand name for the product.s */ export declare const getBrand: (state: StoreState, product: ProductEntity | undefined) => string | undefined; /** * Returns the product variant (color). * * @param product - The product object. * * @returns The product variant. */ export declare const getVariant: (product: ProductEntity | ProductEntityDenormalized | undefined) => string | undefined; /** * Returns the product size by the selected size id. * * @param product - The product object. * @param sizeId - The selected size ID. * * @returns The size name. */ export declare const getSize: (product: ProductEntity | ProductEntityDenormalized | undefined, sizeId: number) => string | undefined; /** * Returns the product size information by the selected size id. * * @param product - The product object. * @param sizeId - The selected size ID. * * @returns The size information. */ export declare const getSizeFullInformation: (product: ProductEntity | ProductEntityDenormalized | undefined, sizeId: number) => import("../../types/index.js").SizeAdapted | undefined; /** * Returns the currency code passed to analytics via `useContext()`. * * @param analyticsInstance - Analytics instance. * * @returns The currency from analytics's context. */ export declare const getCurrency: (analyticsInstance: Analytics) => Promise; /** * Calculates the price discount absolute value by subtracting the price with * discount value from the price without discount value. Using the * price.discount.rate or even the price.discount.includingTaxes was considered but * they introduce additional complexity as they might not exist in the store or * cause rounding errors in the case of the price.discount.rate as it is a * percentage. * * @param priceWithDiscount - The price value with discount. * @param priceWithoutDiscount - The price value without discount. * * @returns The absolute discount value or 0 if either priceWithDiscount or priceWithoutDiscount are * not numbers. */ export declare const calculatePriceDiscount: (priceWithDiscount: number, priceWithoutDiscount: number) => number;