import { FC, ReactNode } from 'react'; import { MenuContext } from '../lib/menu'; export type MenuNode = { type?: 'item' | 'divider' | 'component' | 'submenu'; id?: string; componentId?: string; label?: string | ((ctx: MenuContext, ...args: any[]) => string); shortcuts?: string[] | ((ctx: MenuContext, ...args: any[]) => string[]); visible?: (ctx: MenuContext, ...args: any[]) => boolean; disabled?: (ctx: MenuContext, ...args: any[]) => boolean; checked?: (ctx: MenuContext, ...args: any[]) => boolean; onClick?: (ctx: MenuContext, ...args: any[]) => void | Promise; children?: MenuNode[]; }; type MenuNodesProps = { items: MenuNode[]; ctx: MenuContext; /** Trailing coordinate args passed after ctx to every callback: [] | [x] | [y]. */ args: number[]; /** Called after a leaf item is chosen, to close the whole menu. */ onSelect: () => void; /** Renders a `type: 'component'` descriptor (e.g. the column menu's sort/filter sections). */ renderComponent?: (componentId: string, key: number) => ReactNode; }; /** Renders a list of menu descriptors (with nested submenu support) as `
  • ` rows. */ export declare const MenuNodes: FC; export {}; //# sourceMappingURL=MenuNodes.d.ts.map