import { IRPCProtocol } from '@opensumi/ide-connection';
import { IExtensionInfo, WithEventBus } from '@opensumi/ide-core-common';
import { IEditorDocumentModelService } from '@opensumi/ide-editor/lib/browser';
import { IWebviewService } from '@opensumi/ide-webview';
import { CustomEditorType, ICustomEditorOptions, IMainThreadCustomEditor } from '../../../common/vscode';
import { CustomEditorShouldDisplayEvent, CustomEditorShouldEditEvent, CustomEditorShouldSaveEvent } from '../../../common/vscode/custom-editor';
import { UriComponents } from '../../../common/vscode/models';
import { MainThreadWebview } from './main.thread.api.webview';
export declare class MainThreadCustomEditor extends WithEventBus implements IMainThreadCustomEditor {
    private webview;
    private proxy;
    private customEditors;
    editorDocumentModelService: IEditorDocumentModelService;
    webviewService: IWebviewService;
    constructor(protocol: IRPCProtocol, webview: MainThreadWebview);
    $acceptCustomDocumentDirty(uri: UriComponents, dirty: boolean): void;
    onShouldSave(e: CustomEditorShouldSaveEvent): Promise<any>;
    onShouldRevert(e: CustomEditorShouldSaveEvent): Promise<any>;
    onShouldEdit(e: CustomEditorShouldEditEvent): Promise<void>;
    onCustomEditorShouldDisplayEvent(e: CustomEditorShouldDisplayEvent): Promise<void>;
    $registerCustomEditor(viewType: string, editorType: CustomEditorType, options: ICustomEditorOptions | undefined, extensionInfo: IExtensionInfo): void;
    $unregisterCustomEditor(viewType: string): void;
}
//# sourceMappingURL=main.thread.custom-editor.d.ts.map