import { Options } from "./CompactSelect"; import type { CustomThemeProps } from "../../../Theme/themeProps"; import type { FilterValues } from "../filterTypes"; export type FilterItem = { id: string; label: string; /** Omit it and the item is a value-less toggle — no operator/value control ever renders. */ type?: "text" | "select" | "user" | "date"; option?: { id: string; label: string; }[]; /** Takes precedence over `option` when both are set; `option` is only used as a fallback. */ selectOption?: Options[]; }; export type FilterSection = { id: string; label: string; items?: FilterItem[]; /** Only effective with 2+ sections (Accordion) — a single section always renders expanded. */ initiallyExpanded?: boolean; /** Renders single-select radio buttons instead of checkboxes; only the first `selected` entry is used. */ radio?: boolean; }; export type SelectedFilterItem = { id: string; /** Must match an operator from TEXT_OPERATORS (text) or "is"/"is not" (select/user); unused for date. */ condition?: string; /** Shape follows `type`: string for text, `Date` for date, a full `{id,label}` object for select/user. */ value?: unknown; type?: "text" | "select" | "user" | "date"; }; /** Left-hand filter pane for Table, as a sidebar or a modal. */ export type LeftFilterPaneProps = { title?: string; /** Ignored when `filterMode="modal"` — height is forced to 100% then. */ height?: number | string; sections: FilterSection[]; selected?: FilterValues; /** Also fires on Clear All, but only when `filterMode` is "sidebar" (the default). */ onApply?: (selected: FilterValues) => void; onClear?: () => void; /** Required — unlike most components here, this is not read internally via `useCustomTheme`. */ theme: CustomThemeProps; isApplyLoading?: boolean; filterMode?: "sidebar" | "modal"; }; declare const LeftFilterPane: ({ title, height, sections, selected: selectedProp, onApply, onClear, theme, isApplyLoading, filterMode, }: LeftFilterPaneProps) => import("react/jsx-runtime").JSX.Element; export default LeftFilterPane;