import { IRPCProtocol } from '@opensumi/ide-connection';
import { Disposable, Emitter } from '@opensumi/ide-core-common';
import { IExtHostPlainWebview, IPlainWebviewHandle } from '../../../common/sumi/webview';
import { IExtensionDescription, IMainThreadWebview } from '../../../common/vscode';
export declare class ExtHostWebview {
    private rpcProtocol;
    private webviewIdPrefix;
    _proxy: IMainThreadWebview;
    private handles;
    private _extHostPlainWebviewId;
    constructor(rpcProtocol: IRPCProtocol, webviewIdPrefix?: string);
    getWebviewHandle(id: string): PlainWebviewHandle;
    createPlainWebview(title: string, iconPath?: string): ExtHostPlainWebview;
    $acceptMessage(id: string, message: any): void;
}
export declare class PlainWebviewHandle extends Disposable implements IPlainWebviewHandle {
    protected id: string;
    protected proxy: IMainThreadWebview;
    readonly onMessageEmitter: Emitter<any>;
    readonly onMessage: import("@opensumi/ide-core-common").Event<any>;
    constructor(id: string, proxy: IMainThreadWebview);
    postMessage(message: any): Promise<boolean>;
    setPartition(value?: string | undefined): Promise<void>;
    loadUrl(url: string): Promise<void>;
}
export declare class ExtHostPlainWebview extends PlainWebviewHandle implements IExtHostPlainWebview {
    private _ready;
    constructor(id: string, proxy: IMainThreadWebview, title: string, iconPath?: string);
    reveal(groupIndex: number): Promise<void>;
    loadUrl(url: string): Promise<void>;
}
export declare function createWebviewApi(extension: IExtensionDescription, kaitianExtHostWebview: ExtHostWebview): {
    getPlainWebviewHandle: (id: string) => PlainWebviewHandle;
    createPlainWebview: (title: string, iconPath?: string) => ExtHostPlainWebview;
};
//# sourceMappingURL=ext.host.webview.d.ts.map