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