"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.recordHoverExecutor = void 0;
const toolExecutor_types_1 = require("../toolExecutor-types");
const stepCapture_1 = require("../../background/capture/stepCapture");
const HOVER_STEP_WAIT_TIME_MS = 1_000;
exports.recordHoverExecutor = {
    needsFind: () => true,
    getStepType: () => 'hover',
    execute: async (payload, stateProvider, eventHandler, logger) => {
        if (!payload.find || !payload.contextInfo) {
            logger.error('Record hover executor requires find and contextInfo');
            return {
                success: false,
            };
        }
        return (0, toolExecutor_types_1.recordStepAndTrackResult)(() => (0, stepCapture_1.recordTrainedStep)(payload.find, payload.contextInfo, true, undefined, stateProvider, eventHandler), HOVER_STEP_WAIT_TIME_MS, stateProvider, eventHandler, logger);
    },
};
