import { Dict } from "./commonTypes"; export interface VariantLike { id: string; options: { option_id: string; option_value_id: string; }[]; } export interface Option { key: string; value: string; } export interface OptionSet { variantID: string; options: Option[]; } export interface AggregatedOptions { uniqueOptionIDs: string[]; sets: OptionSet[]; perOptionValues: Dict; enabledValues: Dict>; } export declare function matchVariant(variants: T[], selected: Dict): T | undefined; export declare function closestVariantIDs(opts: AggregatedOptions, selected: Dict): string[]; interface State { enabledValues: Dict>; selected: Dict; variantID: string; } export declare function restrictSelected(opts: AggregatedOptions, selected: Dict, key: string, val: string): State; export declare function selectVariantID(opts: AggregatedOptions, variantID: string): State; export declare function aggregateOptions(variants: VariantLike[]): AggregatedOptions; export {};