import type Testplane from 'testplane';
import type { CommanderStatic } from '@gemini-testing/commander';
import type { TestplaneTestCollectionAdapter } from '../../test-collection/testplane';
import { GuiApi } from '../../../gui/api';
import { HtmlReporter } from '../../../plugin-api';
import { ApiFacade } from '../../../gui/api/facade';
import { EventSource } from '../../../gui/event-source';
import { GuiReportBuilder } from '../../../report-builder/gui';
import { BrowserFeature, ToolName } from '../../../constants';
import { ToolAdapter, ToolAdapterOptionsFromCli, UpdateReferenceOpts } from '../index';
import type { CustomGuiActionPayload, TestSpec } from '../types';
import type { ReporterConfig } from '../../../types';
import type { ConfigAdapter } from '../../config/index';
type HtmlReporterApi = {
    gui: ApiFacade;
    htmlReporter: HtmlReporter;
};
export type TestplaneWithHtmlReporter = Testplane & HtmlReporterApi;
interface OptionsFromPlugin {
    toolName: ToolName.Testplane;
    tool: Testplane;
    reporterConfig: ReporterConfig;
}
type RunTestArgs = [TestplaneTestCollectionAdapter, TestSpec[], CommanderStatic];
type Options = ToolAdapterOptionsFromCli | OptionsFromPlugin;
export declare class TestplaneToolAdapter implements ToolAdapter {
    private _toolName;
    private _tool;
    private _config;
    private _reporterConfig;
    private _htmlReporter;
    private _guiApi?;
    private _browserConfigs;
    private _retryCache;
    static create<TestplaneToolAdapter>(this: new (options: Options) => TestplaneToolAdapter, options: Options): TestplaneToolAdapter;
    constructor(opts: Options);
    get toolName(): ToolName;
    get config(): ConfigAdapter;
    get reporterConfig(): ReporterConfig;
    get htmlReporter(): HtmlReporter;
    get guiApi(): GuiApi | undefined;
    get browserFeatures(): Record<string, BrowserFeature[]>;
    initGuiApi(): void;
    readTests(paths: string[], cliTool: CommanderStatic): Promise<TestplaneTestCollectionAdapter>;
    run(testCollectionAdapter: TestplaneTestCollectionAdapter, tests: TestSpec[] | undefined, cliTool: CommanderStatic): Promise<boolean>;
    runWithoutRetries(...args: RunTestArgs): Promise<boolean>;
    updateReference(opts: UpdateReferenceOpts): void;
    handleTestResults(reportBuilder: GuiReportBuilder, eventSource: EventSource): void;
    halt(err: Error, timeout: number): void;
    initGuiHandler(): Promise<void>;
    runCustomGuiAction(payload: CustomGuiActionPayload): Promise<void>;
    private _disableRetries;
    private _restoreRetries;
}
export {};
