/**
 * @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 Electron's native webContents + CDP.
 *
 * This file is only imported from the Electron main process. It must NOT be
 * included in browser/bun/node entry points.
 *
 * Session isolation is achieved via `session.fromPartition(partitionString)`
 * scoped to projectId + profileName.
 */
export declare class ElectronBackend extends CDPBrowserBackend implements IBrowserContext {
    /** @type {AnyBrowserWindow} Electron BrowserWindow instance */
    private _window;
    /** @type {AnyWebContents} Electron webContents instance */
    private _webContents;
    private _connected;
    private _dialogHandler;
    protected readonly backendName = "ElectronBackend";
    /**
     * Send a Chrome DevTools Protocol command via the Electron debugger.
     * @param method CDP method name (e.g. "DOM.getBoxModel")
     * @param params CDP parameters
     */
    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 wc();
    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>;
    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=ElectronBackend.d.ts.map