import { type ReactNode } from 'react'; /** One choice of a list's filter chips. */ export interface SearchableVirtualListFilterOption { value: string; label: string; } export interface SearchableVirtualListProps { /** The rows to show, already searched and filtered by the caller. */ items: readonly T[]; itemKey: (item: T, index: number) => string; renderItem: (item: T, index: number) => ReactNode; /** The search box; the caller decides what a word matches. */ search: { value: string; onChange: (value: string) => void; label: string; placeholder?: string; }; /** * One row of chips that narrows the list to one choice, with an "All" chip * first. Absent, the list has no chips. */ filters?: { label: string; options: readonly SearchableVirtualListFilterOption[]; /** The chosen option's value, or `''` for all. */ value: string; onChange: (value: string) => void; allLabel?: string; }; /** Scrolls with the rows, above them: a pinned section, a heading. */ header?: ReactNode; /** A line under the controls, such as how many rows match. */ summary?: ReactNode; loading?: boolean; /** Placeholder rows while loading. */ loadingRows?: number; /** The height of a placeholder row, in px. */ loadingRowHeight?: number; error?: { message: string; onRetry?: () => void; } | null; /** What an empty list says; shown when `items` is empty and nothing is loading. */ empty: { label: ReactNode; description?: ReactNode; action?: ReactNode; }; /** * The list's height. Absent, it fills its parent, which must give it one: * a flex column with a height, a dialog's content. */ height?: number | string; /** The gap between rows, in theme spacing units. */ gap?: number; } /** * A long list a person searches, narrows by a row of chips and scrolls, of * which only the rows on screen are drawn (AGL-3656, first for the font * picker's 1,950 families): the search box, the chips, the list, and its * loading, failed and empty states, in the console's own components. * * The caller owns the words and the chosen chip and hands in the rows they * leave, so the list never decides what a search matches. NOT in the barrel: * subpath-import it (`@aglyn/shared-ui-jsx/components/searchable-virtual-list.component`). */ export declare function SearchableVirtualList(props: SearchableVirtualListProps): import("react").JSX.Element; export declare namespace SearchableVirtualList { var displayName: string; } export default SearchableVirtualList;