import type { Component } from "../tui.js"; export interface GroupedSelectGroup { id: string; header: string; items: T[]; initiallyCollapsed?: boolean; emptyHint?: string; disabled?: boolean; } export interface GroupedSelectListOptions { maxVisible: number; renderHeader: (group: GroupedSelectGroup, isSelected: boolean, expanded: boolean) => string; renderItem: (item: T, group: GroupedSelectGroup, isSelected: boolean) => string; renderEmpty?: (group: GroupedSelectGroup) => string; noMatch?: string; } export type GroupedSelection = { kind: "header"; group: GroupedSelectGroup; } | { kind: "item"; group: GroupedSelectGroup; item: T; }; export declare class GroupedSelectList implements Component { private options; private groups; private folded; private seen; private rows; private selectedIndex; private scrollOffset; onSelect?: (selection: GroupedSelection) => void; onCancel?: () => void; onSelectionChange?: (selection: GroupedSelection | null) => void; onToggleGroup?: (group: GroupedSelectGroup, expanded: boolean) => void; constructor(options: GroupedSelectListOptions); setGroups(groups: GroupedSelectGroup[], preserveSelection?: boolean): void; private flatten; private firstSelectableIndex; currentSelection(): GroupedSelection | null; private restoreSelection; private notifyChange; getRows(): number; getMaxVisible(): number; isExpanded(groupId: string): boolean; toggleGroup(groupId: string): void; expandGroup(groupId: string): void; collapseGroup(groupId: string): void; expandAll(): void; collapseAll(): void; moveBy(delta: number): void; moveToFirstOfGroup(groupIndex: number): void; getSelectedGroupIndex(): number | null; currentRowKind(): "header" | "item" | "empty" | null; invalidate(): void; render(width: number): string[]; handleInput(keyData: string): boolean; } //# sourceMappingURL=grouped-select-list.d.ts.map