import { EventEmitter } from 'node:events';
import * as messages from '@cucumber/messages';
import { IdGenerator } from '@cucumber/messages';
import { JsonObject } from 'type-fest';
import { ITestCaseHookParameter, SupportCodeLibrary } from '../support_code_library_builder/types';
import TestCaseHookDefinition from '../models/test_case_hook_definition';
import TestStepHookDefinition from '../models/test_step_hook_definition';
import { IDefinition } from '../models/definition';
import StepDefinitionSnippetBuilder from '../formatter/step_definition_snippet_builder';
import { RunStepResult } from './step_runner';
export interface INewTestCaseRunnerOptions {
    workerId?: string;
    eventBroadcaster: EventEmitter;
    gherkinDocument: messages.GherkinDocument;
    newId: IdGenerator.NewId;
    pickle: messages.Pickle;
    testCase: messages.TestCase;
    retries: number;
    skip: boolean;
    filterStackTraces: boolean;
    supportCodeLibrary: SupportCodeLibrary;
    worldParameters: JsonObject;
    snippetBuilder: StepDefinitionSnippetBuilder;
}
export default class TestCaseRunner {
    private readonly workerId;
    private readonly attachmentManager;
    private currentTestCaseStartedId;
    private currentTestStepId;
    private readonly eventBroadcaster;
    private readonly gherkinDocument;
    private readonly newId;
    private readonly pickle;
    private readonly testCase;
    private readonly maxAttempts;
    private readonly skip;
    private readonly filterStackTraces;
    private readonly supportCodeLibrary;
    private readonly snippetBuilder;
    private testStepResults;
    private world;
    private readonly worldParameters;
    constructor({ workerId, eventBroadcaster, gherkinDocument, newId, pickle, testCase, retries, skip, filterStackTraces, supportCodeLibrary, worldParameters, snippetBuilder, }: INewTestCaseRunnerOptions);
    resetTestProgressData(): void;
    getBeforeStepHookDefinitions(): TestStepHookDefinition[];
    getAfterStepHookDefinitions(): TestStepHookDefinition[];
    getWorstStepResult(): messages.TestStepResult;
    invokeStep(step: messages.PickleStep, stepDefinition: IDefinition, hookParameter?: ITestCaseHookParameter): Promise<RunStepResult>;
    isSkippingSteps(): boolean;
    shouldSkipHook(isBeforeHook: boolean): boolean;
    aroundTestStep(testStepId: string, runStepFn: () => Promise<messages.TestStepResult>): Promise<void>;
    run(): Promise<messages.TestStepResultStatus>;
    runAttempt(attempt: number, moreAttemptsRemaining: boolean): Promise<boolean>;
    runHook(hookDefinition: TestCaseHookDefinition, hookParameter: ITestCaseHookParameter, isBeforeHook: boolean): Promise<messages.TestStepResult>;
    runStepHooks(stepHooks: TestStepHookDefinition[], pickleStep: messages.PickleStep, stepResult?: RunStepResult): Promise<messages.TestStepResult[]>;
    runStep(pickleStep: messages.PickleStep, testStep: messages.TestStep): Promise<RunStepResult>;
}
