import type { Browser, BrowserContext, BrowserContextOptions, Page } from 'playwright-core';
export declare const HEADLESS_CHROMIUM_ARGS: readonly ["--no-sandbox", "--disable-web-security", "--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"];
export declare const INTERACTIVE_CHROMIUM_ARGS: readonly ["--no-sandbox", "--disable-web-security", "--ignore-gpu-blocklist"];
export declare const CHROMIUM_ARGS: readonly ["--no-sandbox", "--disable-web-security", "--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"];
type PlaywrightModule = {
    chromium: {
        launch(options: {
            headless?: boolean;
            args?: readonly string[];
            chromiumSandbox?: boolean;
        }): Promise<Browser>;
        launchPersistentContext?(userDataDir: string, options: BrowserContextOptions & {
            headless?: boolean;
            args?: readonly string[];
            chromiumSandbox?: boolean;
        }): Promise<BrowserContext>;
    };
};
type PlaydropBrowserContextOptions = BrowserContextOptions & {
    automationOrigin?: string | null;
};
export declare function setPlaywrightLoader(loader: (() => Promise<PlaywrightModule>) | null): void;
export declare function createPlaywrightLaunchError(tool: string, error: unknown): Error;
type PageCallback<T> = (context: {
    browser: Browser;
    context: BrowserContext;
    page: Page;
}) => Promise<T>;
export declare function withChromiumPage<T>(callback: PageCallback<T>, options?: PlaydropBrowserContextOptions): Promise<T>;
export declare function launchPersistentChromiumContext(userDataDir: string, options?: PlaydropBrowserContextOptions): Promise<BrowserContext>;
export {};
