import type { OptionAxis, ProductMedia, ProductVariant, VariantSelection } from "../Commerce/commerceTypes"; import type { ProductCardAction } from "./ProductCardProps"; export declare const DEFAULT_SWATCH_LIMIT = 3; export declare const hasChoice: (axes: OptionAxis[]) => boolean; /** The first colour-like axis whose values all carry a swatch; the card draws dots only for this one. */ export declare const swatchAxisOf: (axes: OptionAxis[]) => OptionAxis | undefined; /** The one variant a product without a real choice resolves to, when there is one. */ export declare const soleVariantOf: (axes: OptionAxis[], variants: ProductVariant[]) => ProductVariant | undefined; export declare const isSoldOut: (outOfStock: boolean | undefined, stock: number | undefined, variants: ProductVariant[]) => boolean; /** Units left, only when a real count says the product is low; undefined otherwise. */ export declare const lowStockCount: (stock: number | undefined, sole: ProductVariant | undefined) => number | undefined; export declare const deriveAction: (override: ProductCardAction | undefined, soldOut: boolean, axes: OptionAxis[]) => ProductCardAction; /** Frames for the active swatch value: its mapped media, else the whole pool. */ export declare const framesFor: (media: ProductMedia[], mediaIdsByOption: Record | undefined, axisId: string | undefined, valueId: string | undefined) => ProductMedia[]; /** Variants that share the picked colour, so the price range follows the dot. */ export declare const variantsFor: (variants: ProductVariant[], axisId: string | undefined, valueId: string | undefined) => ProductVariant[]; export declare const rangeOf: (variants: ProductVariant[]) => { min: number; max: number; } | undefined; export declare const valueSoldOut: (variants: ProductVariant[], axisId: string, valueId: string) => boolean; export declare const firstMissingAxis: (axes: OptionAxis[], selection: VariantSelection) => OptionAxis | undefined;