import { PropertyGroupDescription } from '../models/GroupDescription'; import { SortDescription } from '../models/SortDescription'; import { CollectionViewGroup } from './CollectionViewGroup'; export interface GroupResult { groups: CollectionViewGroup[]; /** Leaves reordered so items of the same group are contiguous. */ leaves: T[]; } /** * Build the group tree for `items` (already filtered and sorted) against the * given descriptions. Groups within a level are ordered by their key, honoring * the sort direction of any {@link SortDescription} on that level's property * (so sorting a grouped column reverses its groups). Leaves keep the incoming * order. Returns the tree and the leaves reordered to match, so a caller can use * the reordered array as its view. */ export declare function buildGroups(items: T[], descriptions: PropertyGroupDescription[], sorts?: SortDescription[]): GroupResult;