import * as React from 'react'; import { type FilterField, type FilterGroup, type FilterModel, type FilterRule } from './filter-model.js'; import type { ChangeDetails } from '../../contracts/components.js'; export interface FilterBarLabels { filters?: string | undefined; clearAll?: string | undefined; addFilter?: string | undefined; results?: string | undefined; /** Supports {field}, {operator}, {value} (and {label} = the whole chip text). */ removeFilter?: string | undefined; quickFilters?: string | undefined; /** Collapsed (< 480 px) trigger text; {n} = active rule count. */ filtersCount?: string | undefined; /** 480–767 px overflow toggle; {n} = chips hidden by the two-line clamp. */ more?: string | undefined; fewer?: string | undefined; editFilter?: string | undefined; operator?: string | undefined; value?: string | undefined; from?: string | undefined; to?: string | undefined; apply?: string | undefined; done?: string | undefined; yes?: string | undefined; no?: string | undefined; } export interface FilterBarProps { /** Filterable fields (key, label, type and operators). */ schema: readonly FilterField[]; /** Controlled value. Pair with `onValueChange`. */ value?: FilterGroup | undefined; /** Initial value when uncontrolled. */ defaultValue?: FilterGroup | undefined; /** Called with the new value whenever it changes. */ onValueChange?: ((g: FilterGroup, details: ChangeDetails) => void) | undefined; /** Free-text search box: controlled value, change handler and placeholder. */ search?: { value: string; onValueChange: (v: string) => void; placeholder?: string | undefined; } | undefined; /** One-click filters shown as chips. */ quickFilters?: readonly { id: string; label: string; rule: FilterRule; }[] | undefined; /** Called when the user clears every filter. */ onClearAll?: (() => void) | undefined; /** Shown next to the bar; each change is announced politely ("{n} results"). */ resultCount?: number | undefined; /** Overrides for the built-in, localizable UI strings. */ labels?: FilterBarLabels | undefined; /** Class name merged onto the root element. */ className?: string | undefined; } export declare function FilterBar({ schema, value, defaultValue, onValueChange, search, quickFilters, onClearAll, resultCount, labels, className, }: FilterBarProps): React.JSX.Element; export declare namespace FilterBar { var useModel: (schema: readonly FilterField[], opts?: FilterModelOptions) => FilterModel; var serialize: typeof import('./filter-serialize.js').serialize; var parse: typeof import('./filter-serialize.js').parse; } export interface FilterModelOptions { value?: FilterGroup | undefined; defaultValue?: FilterGroup | undefined; onValueChange?: ((g: FilterGroup, details: ChangeDetails) => void) | undefined; } //# sourceMappingURL=FilterBar.d.ts.map