import { IRPCProtocol } from '@opensumi/ide-connection';
import { Disposable, IExtensionLogger } from '@opensumi/ide-core-common';
import { IToolbarButtonContribution, IToolbarDropdownButtonContribution, IToolbarSelectContribution } from '../../../browser/sumi/types';
import { IExtHostToolbar, IToolbarButtonActionHandle, IToolbarDropdownButtonActionHandle, IToolbarSelectActionHandle } from '../../../common/sumi/toolbar';
import { IExtHostCommands, IExtensionDescription } from '../../../common/vscode';
import { ExtHostCommon } from './ext.host.common';
export declare function createToolbarAPIFactory(extension: IExtensionDescription, service: ExtHostToolbarActionService): {
    registerToolbarAction: <T>(contribution: IToolbarButtonContribution | IToolbarSelectContribution<T> | IToolbarDropdownButtonContribution<T>) => Promise<IToolbarButtonActionHandle | IToolbarSelectActionHandle<T> | IToolbarDropdownButtonActionHandle<T>>;
    getToolbarActionButtonHandle: (id: any) => Promise<IToolbarButtonActionHandle>;
    getToolbarActionSelectHandle: (id: any) => Promise<IToolbarSelectActionHandle<any>>;
    getToolbarActionDropdownButtonHandle: (id: any) => Promise<IToolbarDropdownButtonActionHandle<any>>;
};
export declare class ExtHostToolbarActionService implements IExtHostToolbar {
    private extHostCommands;
    private extHostCommon;
    private rpcProtocol;
    logger: IExtensionLogger;
    private btnHandles;
    private selectHandles;
    private dropdownButtonHandles;
    private readonly proxy;
    constructor(extHostCommands: IExtHostCommands, extHostCommon: ExtHostCommon, rpcProtocol: IRPCProtocol, logger: IExtensionLogger);
    registerToolbarAction<T>(extensionId: string, extensionPath: string, contribution: IToolbarButtonContribution | IToolbarSelectContribution | IToolbarDropdownButtonContribution): Promise<IToolbarButtonActionHandle | IToolbarSelectActionHandle<T> | IToolbarDropdownButtonActionHandle<T>>;
    getToolbarButtonActionHandle(id: string, extensionId: string): Promise<IToolbarButtonActionHandle>;
    getToolbarSelectActionHandle<T = any>(id: string, extensionId: string): Promise<IToolbarSelectActionHandle<T>>;
    getToolbarDropdownButtonActionHandle<T = any>(id: string, extensionId: string): Promise<IToolbarDropdownButtonActionHandle<T>>;
}
export declare class ToolbarBtnActionHandleController extends Disposable {
    readonly id: string;
    private extHostCommands;
    private kaitianCommon;
    private logger;
    private _handle;
    private _onClick;
    private _onStateChange;
    constructor(id: string, extHostCommands: IExtHostCommands, kaitianCommon: ExtHostCommon, logger: IExtensionLogger);
    get handle(): IToolbarButtonActionHandle;
    init(): Promise<unknown>;
}
export declare class ToolbarSelectActionHandleController<T> extends Disposable {
    readonly id: string;
    private extHostCommands;
    private kaitianCommon;
    private _handle;
    private _onSelect;
    private _onStateChange;
    private _value;
    constructor(id: string, extHostCommands: IExtHostCommands, kaitianCommon: ExtHostCommon);
    get handle(): IToolbarSelectActionHandle<T>;
    init(): Promise<void>;
}
export declare class ToolbarDropdownButtonActionHandleController<T> extends Disposable {
    readonly id: string;
    private _extHostCommands;
    private extHostCommon;
    private _handle;
    private _onSelect;
    constructor(id: string, _extHostCommands: IExtHostCommands, extHostCommon: ExtHostCommon);
    get handle(): IToolbarDropdownButtonActionHandle<T>;
    init(): Promise<void>;
}
//# sourceMappingURL=ext.host.toolbar.d.ts.map