import { CollectionViewGroup } from './CollectionViewGroup'; export interface GroupDisplayRow { kind: 'group'; group: CollectionViewGroup; level: number; /** Stable identity across rebuilds, used to remember collapse state. */ pathKey: string; collapsed: boolean; } export interface DataDisplayRow { kind: 'data'; /** Index into the collection view's leaf array. */ viewIndex: number; } export type DisplayRow = GroupDisplayRow | DataDisplayRow; /** * Flattens a collection view's group tree into the linear list of rows the grid * actually renders: a header row per group followed by its data rows, with the * subtree omitted when a group is collapsed. Collapse state is keyed by group * path so it survives rebuilds (re-sort, filter, regroup). */ export declare class GroupRowModel> { private rows; private collapsed; private allKeys; get length(): number; get active(): boolean; rebuild(groups: CollectionViewGroup[]): void; rowAt(index: number): DisplayRow | undefined; isCollapsed(pathKey: string): boolean; toggle(pathKey: string): void; collapseAll(): void; expandAll(): void; /** The path keys of every collapsed group, for saving state. */ collapsedKeys(): string[]; /** Replace the collapsed set (used when restoring saved state). */ setCollapsed(keys: string[]): void; }