import { PageAgent } from './agent.js';
import { MidsceneYamlScriptEnv, ScriptPlayerTaskStatus, ScriptPlayerStatusValue, MidsceneYamlScript, FreeFn } from '@midscene_spp/core';

declare class ScriptPlayer<T extends MidsceneYamlScriptEnv> {
    private script;
    private setupAgent;
    onTaskStatusChange?: ((taskStatus: ScriptPlayerTaskStatus) => void) | undefined;
    currentTaskIndex?: number;
    taskStatusList: ScriptPlayerTaskStatus[];
    status: ScriptPlayerStatusValue;
    reportFile?: string | null;
    result: Record<string, any>;
    private unnamedResultIndex;
    output?: string | null;
    errorInSetup?: Error;
    private pageAgent;
    agentStatusTip?: string;
    constructor(script: MidsceneYamlScript, setupAgent: (platform: T) => Promise<{
        agent: PageAgent;
        freeFn: FreeFn[];
    }>, onTaskStatusChange?: ((taskStatus: ScriptPlayerTaskStatus) => void) | undefined);
    private setResult;
    private setPlayerStatus;
    private notifyCurrentTaskStatusChange;
    private setTaskStatus;
    private setTaskIndex;
    private flushResult;
    playTask(taskStatus: ScriptPlayerTaskStatus, agent: PageAgent): Promise<void>;
    run(): Promise<void>;
}

declare function parseYamlScript(content: string, filePath?: string, ignoreCheckingTarget?: boolean): MidsceneYamlScript;

export { ScriptPlayer as S, parseYamlScript as p };
