"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ElseStep = void 0;
const MablStepV2_1 = require("../MablStepV2");
class ElseStep extends MablStepV2_1.MablStepV2 {
    static stepName = 'Else';
    static actionCode = 'conditional_else';
    static mablScriptStepNames = [ElseStep.actionCode];
    static yamlMablScriptNames = [ElseStep.stepName];
    constructor(descriptor) {
        super(ElseStep.stepName, descriptor, ElseStep.actionCode);
    }
    getStepName() {
        return ElseStep.stepName;
    }
    static fromYaml(_stepName, stepArgs) {
        return new ElseStep(stepArgs);
    }
    static fromLegacyMablscript(_args, _actions) {
        const stepDescriptor = {
            actionCode: ElseStep.actionCode,
        };
        const step = new ElseStep(stepDescriptor);
        step.actions = _actions;
        return step;
    }
    toMablscript() {
        return `conditional_else()`;
    }
    stepDescription() {
        return 'ELSE';
    }
    static create(descriptor) {
        descriptor.id = descriptor.id ?? MablStepV2_1.MablStepV2.generateStepId();
        return new ElseStep(descriptor);
    }
}
exports.ElseStep = ElseStep;
