import { type ExecutionDump, ReportActionDump, type ReportAttributes, type ReportMeta } from './types';
export interface IReportGenerator {
    /**
     * Write or update a single execution.
     * Each call appends a new dump script tag. The frontend deduplicates
     * executions with the same id/name, keeping only the last one.
     *
     * @param execution  Current execution's full data
     * @param reportMeta  Report-level metadata (groupName, sdkVersion, etc.)
     */
    onExecutionUpdate(execution: ExecutionDump, reportMeta: ReportMeta, attributes?: ReportAttributes): void;
    /**
     * @deprecated Use onExecutionUpdate instead. Kept for backward compatibility.
     */
    onDumpUpdate?(dump: ReportActionDump): void;
    /**
     * Wait for all queued write operations to complete.
     */
    flush(): Promise<void>;
    /**
     * Finalize the report. Calls flush() internally.
     */
    finalize(): Promise<string | undefined>;
    getReportPath(): string | undefined;
}
export declare const nullReportGenerator: IReportGenerator;
export declare function assertReportGenerationOptions(opts: {
    generateReport?: boolean;
    persistExecutionDump?: boolean;
}): void;
export declare class ReportGenerator implements IReportGenerator {
    private reportPath;
    private screenshotMode;
    private shouldPersistExecutionDump;
    private autoPrint;
    private firstWriteDone;
    private executionLogIndex;
    private executionLogFileIndexByExecutionKey;
    private readonly reportStreamId;
    private screenshotStore;
    private initialized;
    private lastExecution?;
    private lastReportMeta?;
    private reportAttributes;
    private writeQueue;
    private destroyed;
    constructor(options: {
        reportPath: string;
        screenshotMode: 'inline' | 'directory';
        persistExecutionDump?: boolean;
        autoPrint?: boolean;
    });
    static create(reportFileName: string, opts: {
        generateReport?: boolean;
        persistExecutionDump?: boolean;
        outputFormat?: 'single-html' | 'html-and-external-assets';
        autoPrintReportMsg?: boolean;
    }): IReportGenerator;
    onExecutionUpdate(execution: ExecutionDump, reportMeta: ReportMeta, attributes?: ReportAttributes): void;
    flush(): Promise<void>;
    finalize(): Promise<string | undefined>;
    getReportPath(): string | undefined;
    private printReportPath;
    private doWriteExecution;
    private mergeReportAttributes;
    private hydrateStateFromExistingReport;
    private getDumpScriptAttributes;
    /**
     * Wrap an ExecutionDump + ReportMeta into a single-execution ReportActionDump.
     */
    private wrapAsReportDump;
    /**
     * Append-only inline mode: write new screenshots and a dump tag on every call.
     * The frontend deduplicates executions with the same id/name (keeps last).
     * Duplicate dump JSON is acceptable; only screenshots are deduplicated.
     */
    private writeInlineExecution;
    private writeDirectoryExecution;
    private getExecutionLogKey;
    private persistExecutionDumpToFile;
}
