import type { Ctx } from '@milkdown/kit/ctx'; type MenuItem = { index: number; key: string; onRun?: (ctx: Ctx) => void; } & T; type WithRange = HasIndex extends true ? T & { range: [start: number, end: number]; } : T; export type MenuItemGroup = WithRange<{ key: string; label: string; items: HasIndex extends true ? MenuItem[] : Omit, 'index'>[]; }, HasIndex>; export declare class GroupBuilder { #private; clear: () => this; addGroup: (key: string, label: string) => { group: { key: string; label: string; items: Omit, "index">[]; }; addItem: (key: string, item: Omit, "key" | "index">) => /*elided*/ any; clear: () => /*elided*/ any; }; getGroup: (key: string) => { group: { key: string; label: string; items: Omit, "index">[]; }; addItem: (key: string, item: Omit, "key" | "index">) => /*elided*/ any; clear: () => /*elided*/ any; }; build: () => { key: string; label: string; items: Omit, "index">[]; }[]; } export {}; //# sourceMappingURL=group-builder.d.ts.map