import { type GridState } from '../../core/grid/index.js'; import { type GridFeature, type RowNode } from '../../core/types/index.js'; import type { Aggregation, GroupingOptions } from './grouping.types.js'; export declare class Grouping { #private; by: string[]; aggregations: Record>; readonly expandedByDefault: boolean; readonly groupFooters: boolean; readonly grandTotal: boolean; constructor(grid: GridState, options: GroupingOptions); get isPartial(): boolean; groupLabel: (key: string, count: number, columnId: string) => string; footerLabel: (key: string, count: number, columnId: string) => string; grandTotalLabel: (count: number) => string; get isGrouped(): boolean; isGroupedBy(columnId: string): boolean; groupableColumns(): { id: string; header: string; }[]; setGroupBy: (columnIds: string[]) => void; groupBy: (columnId: string) => void; ungroup: (columnId: string) => void; moveGroup: (columnId: string, offset: number) => void; clearGrouping: () => void; expandAllGroups: () => void; collapseAllGroups: () => void; setAggregation: (columnId: string, aggregation: Aggregation | null) => void; buildNodes: (nodes: RowNode[]) => RowNode[]; grandTotalNode: (leaves: RowNode[]) => RowNode; } export declare function grouping(options?: GroupingOptions): GridFeature; export declare function getGrouping(grid: GridState): Grouping | undefined; declare module '../../core/types/api.js' { interface GridApi { groupBy?: (columnId: string) => void; ungroup?: (columnId: string) => void; setGroupBy?: (columnIds: string[]) => void; clearGrouping?: () => void; expandAllGroups?: () => void; collapseAllGroups?: () => void; isGroupingPartial?: () => boolean; setAggregation?: (columnId: string, aggregation: unknown) => void; getAggregations?: () => Record; } }