import type { HotInstance } from '../../core/types'; interface CommandDescriptor { key?: string; callback?: Function; disabled?: boolean | (() => boolean); submenu?: { items: CommandDescriptor[]; }; [key: string]: unknown; } /** * Command executor for ContextMenu. * * @private * @class CommandExecutor */ export declare class CommandExecutor { /** * @type {Core} */ hot: HotInstance; /** * @type {object} */ commands: Record; /** * @type {Function} */ commonCallback: Function | null; /** * Initializes the command executor with a reference to the Handsontable instance. */ constructor(hotInstance: HotInstance); /** * Register command. * * @param {string} name Command name. * @param {object} commandDescriptor Command descriptor object with properties like `key` (command id), * `callback` (task to execute), `name` (command name), `disabled` (command availability). */ registerCommand(name: string, commandDescriptor: CommandDescriptor): void; /** * Set common callback which will be trigger on every executed command. * * @param {Function} callback Function which will be fired on every command execute. */ setCommonCallback(callback: Function): void; /** * Execute command by its name. * * @param {string} commandName Command id. * @param {*} params Arguments passed to command task. */ execute(commandName: string, ...params: unknown[]): void; } export {};