/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
import type { Page } from 'playwright';
interface Box {
    x: number;
    y: number;
    width: number;
    height: number;
}
interface CapturableTarget {
    boundingBox?: (options?: {
        timeout?: number;
    }) => Promise<Box | null>;
    scrollIntoViewIfNeeded?: (options?: {
        timeout?: number;
    }) => Promise<void>;
}
export declare class ScreenshotCaptureSession {
    private readonly outputDir;
    private readonly onScreenshotWritten;
    private readonly screenshotTimeoutMs;
    private seq;
    private readonly cdpSessionCache;
    constructor(outputDir: string, onScreenshotWritten: (filename: string) => void, screenshotTimeoutMs: number);
    captureWithHighlight(page: Page, target: CapturableTarget, actionName: string, options: {
        scrollBeforeCapture: boolean;
    }): Promise<(() => Promise<void>) | null>;
    private waitForPageIdle;
    private measureBox;
    private drawAndScreenshot;
    private takeScreenshot;
    private cdpSend;
    private getCDPSession;
}
export {};
