import type { MessagePort } from "node:worker_threads";
import type { NativeWebView } from "./native-webview.ts";
export interface WebViewClientHost {
    /**
     * Launches a view; `adopt` runs in the launch's own turn and returns false once the client is released,
     * and `wanted` tells a launch about to be retried whether anyone still waits for it.
     */
    createView(options: Readonly<Record<string, unknown>>, onConsole: ((...args: unknown[]) => void) | undefined, adopt: (view: NativeWebView) => boolean, wanted: () => boolean): Promise<NativeWebView>;
    onClientClosed(client: WebViewServiceClient): void;
}
export declare function closeQuietly(view: NativeWebView): void;
/**
 * One kernel's capability: the views it created and the only port that can reach them. Nothing is
 * addressable across clients, so one session's cell cannot see, drive, or close another's views.
 */
export declare class WebViewServiceClient {
    #private;
    readonly id: string;
    readonly owner: object;
    constructor(id: string, owner: object, port: MessagePort, host: WebViewClientHost);
    get viewCount(): number;
    /** Resolves once every launch this client started has been adopted or has retired its Chrome. */
    settled(): Promise<void>;
    release(): void;
}
//# sourceMappingURL=webview-client.d.ts.map