import type { MaybeRefOrGetter, PropType, Ref } from 'vue'; import type { SortItem } from './sort.js'; import type { DataTableItem } from '../types.js'; export interface GroupableItem { type: 'item'; raw: T; } export interface Group { type: 'group'; depth: number; id: string; key: string; value: any; items: readonly (T | Group | GroupSummary)[]; } export interface GroupSummary { type: 'group-summary'; depth: number; id: string; key: string; value: any; items: readonly (T | Group | GroupSummary)[]; } export declare const makeDataTableGroupProps: (defaults?: Defaults | undefined) => { groupBy: unknown extends Defaults["groupBy"] ? { type: PropType; default: () => never[]; } : Omit<{ type: PropType; default: () => never[]; }, "default" | "type"> & { type: PropType; default: unknown extends Defaults["groupBy"] ? readonly SortItem[] : readonly SortItem[] | Defaults["groupBy"]; }; }; type GroupProps = { groupBy: readonly SortItem[]; 'onUpdate:groupBy': ((value: SortItem[]) => void) | undefined; }; export declare function createGroupBy(props: GroupProps): { groupBy: Ref & { readonly externalValue: readonly SortItem[]; }; }; export declare function provideGroupBy(options: { groupBy: Ref; sortBy: Ref; disableSort?: Ref; }): { sortByWithGroups: import("vue").ComputedRef; toggleGroup: (group: Group) => void; opened: Ref & Omit, keyof Set>, Set | (Set & Omit, keyof Set>)>; groupBy: Ref; extractRows: (items: readonly (T | Group | GroupSummary)[]) => T[]; isGroupOpen: (group: Group) => boolean; }; export declare function useGroupBy(): { opened: Ref>; toggleGroup: (group: Group) => void; isGroupOpen: (group: Group) => boolean; sortByWithGroups: Ref; groupBy: Ref; extractRows: (items: (DataTableItem | Group)[]) => DataTableItem[]; }; export declare function useGroupedItems(items: MaybeRefOrGetter, groupBy: Ref, opened: Ref>, hasSummary: MaybeRefOrGetter): { groups: import("vue").ComputedRef[]>; flatItems: import("vue").ComputedRef | GroupSummary)[]>; };