"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.recordElseExecutor = void 0;
const ElseStep_1 = __importDefault(require("../../sharedUtils/mablscript/canonical/ElseStep"));
const conditionalClauseUtils_1 = require("./conditionalClauseUtils");
exports.recordElseExecutor = {
    needsFind: () => false,
    getStepType: () => 'else',
    execute: async (payload, _stateProvider, eventHandler, _logger) => {
        const toolParams = payload.toolCall.toolParams;
        const elseStep = ElseStep_1.default.create();
        await eventHandler.dispatchSteps([elseStep]);
        await (0, conditionalClauseUtils_1.prepopulateConditionalClause)(toolParams.intent ?? 'Fill in other cases', eventHandler);
        return { success: true, message: 'Recorded ELSE step' };
    },
};
