import type { HTMLAttributes, ReactNode } from "react"; /** One active filter chip; label is what's shown, id identifies it for removal. */ export interface FilterBarActiveFilter { /** Passed to `onRemoveFilter` when this chip's remove icon is clicked. */ id: string | number; /** Chip text. */ label: string; } /** Search + filters + actions toolbar row; other `
` attributes land on the root. */ export interface FilterBarProps extends Omit, "color" | "children" | "dangerouslySetInnerHTML"> { /** Search control, e.g. a TextInput or Search — rendered first in the row. */ search?: ReactNode; /** Accessible name for the `role="search"` landmark wrapping `search`. Defaults to `"Search"`; does not by itself name the control inside — give that its own label. */ searchLabel?: string; /** Filter controls (SelectV2, DatePicker, …), rendered after `search`. */ children?: ReactNode; /** Right-aligned controls after the summary, e.g. a "Filters" or "Export" Button. */ actions?: ReactNode; /** Muted count text before `actions`, e.g. "600 deals". */ summary?: ReactNode; /** Chips shown below the row for each currently-applied filter. */ activeFilters?: FilterBarActiveFilter[]; /** Called with a chip's id when its remove icon is clicked; chips render read-only without it. */ onRemoveFilter?: (id: string | number) => void; /** Shows a ghost "Clear all" button after the chips when set. */ onClearAll?: () => void; }