import type Testplane from 'testplane';
import type { TestCollection, Test as TestplaneTest, Config as TestplaneConfig } from 'testplane';
import { GuiReportBuilder, GuiReportBuilderResult } from '../../report-builder/gui';
import { TestplaneTestResult, HtmlReporterApi, ImageInfoUpdated } from '../../types';
import { GuiCliOptions, GuiConfigs } from '../index';
import { Tree, TreeImage } from '../../tests-tree-builder/base';
import { TestSpec } from './runner/runner';
import { Response } from 'express';
import { TestBranch, TestEqualDiffsData, TestRefUpdateData } from '../../tests-tree-builder/gui';
import { ReporterTestResult } from '../../test-adapter';
type ToolRunnerArgs = [paths: string[], testplane: Testplane & HtmlReporterApi, configs: GuiConfigs];
type ReplModeOption = {
    enabled: boolean;
    beforeTest: boolean;
    onFail: boolean;
};
export type ToolRunnerTree = GuiReportBuilderResult & Pick<GuiCliOptions, 'autoRun'>;
export interface UndoAcceptImagesResult {
    updatedImages: TreeImage[];
    removedResults: string[];
}
export declare class ToolRunner {
    private _testFiles;
    private _testplane;
    private _tree;
    protected _collection: TestCollection | null;
    private _globalOpts;
    private _guiOpts;
    private _reportPath;
    private _pluginConfig;
    private _eventSource;
    protected _reportBuilder: GuiReportBuilder | null;
    private _tests;
    private _expectedImagesCache;
    static create<T extends ToolRunner>(this: new (...args: ToolRunnerArgs) => T, ...args: ToolRunnerArgs): T;
    constructor(...[paths, testplane, { program: globalOpts, pluginConfig, options: guiOpts }]: ToolRunnerArgs);
    get config(): TestplaneConfig;
    get tree(): ToolRunnerTree | null;
    initialize(): Promise<void>;
    _readTests(): Promise<TestCollection>;
    _getReplModeOption(): ReplModeOption;
    protected _ensureReportBuilder(): GuiReportBuilder;
    protected _ensureTestCollection(): TestCollection;
    finalize(): Promise<void>;
    addClient(connection: Response): void;
    sendClientEvent(event: string, data: unknown): void;
    getTestsDataToUpdateRefs(imageIds: string[]): TestRefUpdateData[];
    getImageDataToFindEqualDiffs(imageIds: string[]): TestEqualDiffsData[];
    updateReferenceImage(tests: TestRefUpdateData[]): Promise<TestBranch[]>;
    undoAcceptImages(tests: TestRefUpdateData[]): Promise<UndoAcceptImagesResult>;
    findEqualDiffs(images: TestEqualDiffsData[]): Promise<string[]>;
    run(tests?: TestSpec[]): Promise<boolean>;
    protected _handleRunnableCollection(): Promise<void>;
    protected _isSilentlySkipped({ silentSkip, parent }: TestplaneTest): boolean;
    protected _subscribeOnEvents(): void;
    protected _createTestplaneTestResult(updateData: TestRefUpdateData): TestplaneTestResult;
    protected _handleReferenceUpdate(testResult: ReporterTestResult, imageInfo: ImageInfoUpdated, state: string): void;
    _fillTestsTree(): Promise<void>;
    protected _loadDataFromDatabase(): Promise<Tree | null>;
    protected _resolveImgPath(imgPath: string): string;
}
export {};
