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