import { CommandRegistry } from '../command'; import { Disposable } from '../disposable'; import { MenuPath } from './menu-types'; export declare type MenuCommandArguments = [menuPath: MenuPath, command: string, ...commandArgs: unknown[]]; export declare const MenuCommandExecutor: unique symbol; export interface MenuCommandExecutor { isVisible(...args: MenuCommandArguments): boolean; isEnabled(...args: MenuCommandArguments): boolean; isToggled(...args: MenuCommandArguments): boolean; executeCommand(...args: MenuCommandArguments): Promise; } export declare const MenuCommandAdapter: unique symbol; export interface MenuCommandAdapter extends MenuCommandExecutor { /** Return values less than or equal to 0 are treated as rejections. */ canHandle(...args: MenuCommandArguments): number; } export declare const MenuCommandAdapterRegistry: unique symbol; export interface MenuCommandAdapterRegistry { registerAdapter(adapter: MenuCommandAdapter): Disposable; getAdapterFor(...args: MenuCommandArguments): MenuCommandAdapter | undefined; } export declare class MenuCommandExecutorImpl implements MenuCommandExecutor { protected readonly adapterRegistry: MenuCommandAdapterRegistry; protected readonly commandRegistry: CommandRegistry; executeCommand(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): Promise; isVisible(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): boolean; isEnabled(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): boolean; isToggled(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): boolean; protected delegate(menuPath: MenuPath, command: string, commandArgs: unknown[], method: T): ReturnType; } export declare class MenuCommandAdapterRegistryImpl implements MenuCommandAdapterRegistry { protected readonly adapters: MenuCommandAdapter[]; registerAdapter(adapter: MenuCommandAdapter): Disposable; getAdapterFor(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): MenuCommandAdapter | undefined; } //# sourceMappingURL=menu-adapter.d.ts.map