"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.reloadPageExecutor = void 0;
const toolExecutor_types_1 = require("../toolExecutor-types");
const stepCapture_1 = require("../../background/capture/stepCapture");
const mablscript_step_types_1 = require("../../sharedUtils/mablscript-step-types");
exports.reloadPageExecutor = {
    needsFind: () => false,
    getStepType: () => mablscript_step_types_1.StepType.NAVIGATION,
    execute: async (payload, stateProvider, eventHandler, logger) => {
        const contextInfo = payload.contextInfo ?? (await stateProvider.getActiveContextInfo());
        return (0, toolExecutor_types_1.recordStepAndTrackResult)(() => (0, stepCapture_1.recordTrainedStep)({
            action: 'record',
            listener: 'navigation',
            type: 'reload',
        }, contextInfo, true, undefined, stateProvider, eventHandler), 0, stateProvider, eventHandler, logger);
    },
};
