/**
 * @license
 * Copyright 2025 Steven Roussey <sroussey@gmail.com>
 * SPDX-License-Identifier: Apache-2.0
 */
import { CDPBrowserBackend } from "./CDPBrowserBackend";
import type { BrowserConnectOptions, ConsoleMessage, DialogAction, DialogInfo, DownloadOptions, DownloadResult, ElementRef, IBrowserContext, NavigateOptions, NetworkFilter, NetworkRequest, ScreenshotOptions, TabInfo, WaitOptions } from "./IBrowserContext";
/**
 * IBrowserContext implementation using Bun's built-in WebView API + CDP.
 *
 * Bun.WebView provides a headless browser with Chrome DevTools Protocol
 * access. This backend wraps the WebView, delegating CDP operations to the
 * abstract CDPBrowserBackend base class and using native WebView methods
 * for navigation, screenshots, and keyboard input.
 *
 * This file should only be imported in Bun environments.
 */
export declare class BunWebViewBackend extends CDPBrowserBackend implements IBrowserContext {
    private readonly defaultChromePath?;
    private _wv;
    private _connected;
    private _dialogHandler;
    protected readonly backendName = "BunWebViewBackend";
    /**
     * @param defaultChromePath Optional default Chrome binary path. Used when
     *   `connect()` is called without `chromePath` in options (e.g., via
     *   BrowserSessionTask which doesn't expose chromePath in its config).
     */
    constructor(defaultChromePath?: string | undefined);
    protected cdp(method: string, params?: Record<string, unknown>): Promise<unknown>;
    protected evaluateInPage<T>(script: string): Promise<T>;
    connect(options?: BrowserConnectOptions): Promise<void>;
    disconnect(): Promise<void>;
    isConnected(): boolean;
    private get wv();
    navigate(url: string, options?: NavigateOptions): Promise<void>;
    goBack(_options?: NavigateOptions): Promise<void>;
    goForward(_options?: NavigateOptions): Promise<void>;
    reload(_options?: NavigateOptions): Promise<void>;
    currentUrl(): Promise<string>;
    title(): Promise<string>;
    content(): Promise<string>;
    evaluate<T>(expression: string): Promise<T>;
    screenshot(options?: ScreenshotOptions): Promise<Buffer>;
    pressKey(key: string, _options?: WaitOptions): Promise<void>;
    type(text: string, _options?: WaitOptions): Promise<void>;
    download(_trigger: () => Promise<void>, _options?: DownloadOptions): Promise<DownloadResult>;
    onDialog(handler: (info: DialogInfo) => DialogAction | Promise<DialogAction>): void;
    tabs(): Promise<readonly TabInfo[]>;
    switchTab(_tabId: string): Promise<void>;
    newTab(url?: string): Promise<TabInfo>;
    closeTab(_tabId: string): Promise<void>;
    waitForNavigation(options?: NavigateOptions): Promise<void>;
    waitForSelector(selector: string, options?: WaitOptions): Promise<ElementRef>;
    waitForIdle(options?: WaitOptions): Promise<void>;
    readonly networkRequests: (_filter?: NetworkFilter) => Promise<readonly NetworkRequest[]>;
    readonly consoleMessages: () => Promise<readonly ConsoleMessage[]>;
}
//# sourceMappingURL=BunWebViewBackend.d.ts.map