import type { FilterValues } from './filterSchema.js'; import { type AdvancedFilterClause, type AdvancedFilterGroup } from './advancedFilters.js'; export type { AdvancedFilterClause, AdvancedFilterGroup, AdvancedFilterNode, AdvancedFilterRule, AdvancedFilterValue, FilterCombinator, FilterFieldDef, FilterFieldOption, FilterFieldType, FilterOperator, FilterValueKind } from './advancedFilters.js'; export { OP_LABELS, DEFAULT_OPS, FILTER_OPERATORS, clausesToGroup, groupToClauses, emptyFilterGroup, emptyFilterRule, flattenRules, countRules, matchGroup, matchRuleValue, resolveValueKind, operatorsForField, formatRuleLabel, asFilterGroup } from './advancedFilters.js'; /** Serializable catalog / ecommerce filter state (UI + URL). */ export interface CatalogPriceRange { min?: number; max?: number; } export interface CatalogFilterState { q: string; /** @deprecated Prefer `values` (schema-driven bag) */ facets: Record; /** Advanced query tree (AND/OR groups + rules) */ advanced: AdvancedFilterGroup | AdvancedFilterClause[]; sort?: string; page?: number; /** @deprecated Prefer `values.price` as [min,max] */ price?: CatalogPriceRange; /** Preferred: one bag for all filter fields */ values?: FilterValues; } export declare const EMPTY_FILTER_STATE: CatalogFilterState; /** Parse catalog filter state from a query string or URLSearchParams. */ export declare function parseFilterParams(search: string | URLSearchParams): CatalogFilterState; /** Serialize catalog filter state to URLSearchParams (omit empty keys). */ export declare function serializeFilterParams(state: CatalogFilterState): URLSearchParams; /** Convenience: state → `?q=...&f.brand=...` string (empty string when no params). */ export declare function filterParamsToSearch(state: CatalogFilterState): string; export declare function createEmptyFilterState(partial?: Partial): CatalogFilterState;