import EventEmitter from 'node:events';
import type { Browser, LaunchOptions, Page } from 'playwright';
import { type OutlineNode } from './outline.js';
export type PDFOptions = Exclude<Parameters<Page['pdf']>[0], undefined>;
export type { Browser, LaunchOptions, Page };
export type PageInitScriptFn = Page['addInitScript'];
export interface PrinterOptions {
    debug?: boolean;
    headless?: LaunchOptions['headless'];
    allowLocal?: boolean;
    allowRemote?: boolean;
    outlineTags?: string[];
    initScripts?: PageInitScriptFn[];
    additionalScripts?: string[];
    additionalStyles?: string[];
    allowedPaths?: string[];
    allowedDomains?: string[];
    ignoreHTTPSErrors?: boolean;
    browserEndpoint?: string;
    browserArgs?: string[];
    timeout?: number;
    emulateMedia?: null | 'screen' | 'print';
    enableWarnings?: boolean;
    outlineContainerSelector?: string;
}
export declare class Printer extends EventEmitter {
    private debug;
    private headless;
    private allowLocal;
    private outlineTags;
    private allowRemote;
    private initScripts;
    private additionalScripts;
    private additionalStyles;
    private allowedPaths;
    private allowedDomains;
    private ignoreHTTPSErrors;
    private browserWSEndpoint?;
    private browserArgs;
    private timeout;
    private emulateMedia;
    private enableWarnings;
    private outlineContainerSelector;
    private browser?;
    private browserContext?;
    private page?;
    private url?;
    constructor(options?: PrinterOptions);
    setup(launchOptions?: LaunchOptions): Promise<Page>;
    render(url: string): Promise<Page>;
    pdf(url: string, options?: PDFOptions, pdfOutlines?: boolean): Promise<{
        data: Uint8Array<ArrayBufferLike>;
        outlineNodes: OutlineNode[];
    }>;
    closeBrowser(): Promise<void>;
    needsAllowedRules(): number;
    withinAllowedPath(pathname: string): boolean;
    isAllowedDomain(domain: string): boolean;
}
