import { CommandRegistry, Disposable, MenuCommandAdapter, MenuPath, SelectionService } from '@theia/core';
import { ResourceContextKey } from '@theia/core/lib/browser/resource-context-key';
import { URI as CodeUri } from '@theia/core/shared/vscode-uri';
import { ScmService } from '@theia/scm/lib/browser/scm-service';
import { TimelineItem } from '@theia/timeline/lib/common/timeline-model';
import { ScmCommandArg, TimelineCommandArg, TreeViewItemReference } from '../../../common';
import { CodeEditorWidgetUtil } from './vscode-theia-menu-mappings';
export declare type ArgumentAdapter = (...args: unknown[]) => unknown[];
export declare class ReferenceCountingSet<T> {
    protected readonly references: Map<T, number>;
    constructor(initialMembers?: Iterable<T>);
    add(newMember: T): ReferenceCountingSet<T>;
    /** @returns true if the deletion results in the removal of the element from the set */
    delete(member: T): boolean;
    has(maybeMember: T): boolean;
}
export declare class PluginMenuCommandAdapter implements MenuCommandAdapter {
    protected readonly commandRegistry: CommandRegistry;
    protected readonly codeEditorUtil: CodeEditorWidgetUtil;
    protected readonly scmService: ScmService;
    protected readonly selectionService: SelectionService;
    protected readonly resourceContextKey: ResourceContextKey;
    protected readonly commands: ReferenceCountingSet<string>;
    protected readonly argumentAdapters: Map<string, ArgumentAdapter>;
    protected readonly separator = ":)(:";
    protected init(): void;
    canHandle(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): number;
    executeCommand(menuPath: MenuPath, command: string, ...commandArgs: unknown[]): Promise<unknown>;
    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 getAdapterOrThrow(menuPath: MenuPath): ArgumentAdapter;
    addCommand(commandId: string): Disposable;
    protected getArgumentAdapterForMenu(menuPath: MenuPath): ArgumentAdapter | undefined;
    protected addArgumentAdapter(menuPath: MenuPath, adapter: ArgumentAdapter): void;
    protected toCommentArgs(...args: any[]): any[];
    protected toScmArgs(...args: any[]): any[];
    protected toScmArg(arg: any): ScmCommandArg | undefined;
    protected toScmChangeArgs(...args: any[]): any[];
    protected toTimelineArgs(...args: any[]): any[];
    protected toTestMessageArgs(...args: any[]): any[];
    protected toTimelineArg(arg: TimelineItem): TimelineCommandArg;
    protected toTreeArgs(...args: any[]): any[];
    protected getSelectedResources(): [CodeUri | TreeViewItemReference | undefined, CodeUri[] | undefined];
}
//# sourceMappingURL=plugin-menu-command-adapter.d.ts.map