import type { eventWithTime as RrwebEvent } from '@rrweb/types';
import type Testplane from 'testplane';
import { ReporterTestResult } from '../../test-result';
import { SnapshotAttachment, SnapshotsSaver } from '../../../types';
import { EventSource } from '../../../gui/event-source';
export interface TestContext {
    testPath: string[];
    browserId: string;
}
export interface SnapshotsData {
    rrwebSnapshots: RrwebEvent[];
}
export declare const snapshotsInProgress: Record<string, RrwebEvent[]>;
export declare const getSnapshotHashWithoutAttempt: (context: TestContext) => string;
interface CreateSnapshotFilePathParams {
    attempt: number;
    hash: string;
    browserId: string;
    timestamp: number;
}
export declare function createSnapshotFilePath({ attempt: attemptInput, hash, browserId, timestamp }: CreateSnapshotFilePathParams): string;
export declare const handleDomSnapshotsEvent: (client: EventSource | null, context: TestContext, data: SnapshotsData) => void;
interface FinalizeSnapshotsParams {
    testResult: ReporterTestResult;
    attempt: number;
    timeTravelConfig: Testplane['config']['timeTravel'];
    reportPath: string;
    eventName: Testplane['events'][keyof Testplane['events']];
    events: Testplane['events'];
    snapshotsSaver?: SnapshotsSaver | null;
}
export declare const finalizeSnapshotsForTest: ({ testResult, attempt, reportPath, timeTravelConfig, events, eventName, snapshotsSaver }: FinalizeSnapshotsParams) => Promise<SnapshotAttachment[]>;
export {};
