import { BrowserContext, Page } from 'playwright';
export declare class BrowserManager {
    private static instance;
    private browser;
    private launchPromise;
    private jobCount;
    private activeJobs;
    private readonly MAX_JOBS_PER_BROWSER;
    private constructor();
    static getInstance(): BrowserManager;
    /**
     * Returns a new isolated browser context.
     * Launches the browser if it doesn't exist or needs recycling.
     */
    getNewContext(options?: {
        headless?: boolean;
        proxy?: any;
    }): Promise<BrowserContext>;
    /**
     * Decrements active job count. Should be called when a job finishes.
     */
    decrementActiveJobs(): void;
    /**
     * Ensures a browser instance is running with optimized flags.
     */
    private ensureBrowser;
    /**
     * Closes the shared browser instance.
     */
    cleanup(): Promise<void>;
    /**
     * Setup resource blocking for a page.
     */
    setupResourceBlocking(page: Page): Promise<void>;
    /**
     * Setup popup and extra tab control.
     */
    setupPageProtection(context: BrowserContext, mainPage: Page): void;
}
