"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.translateToMablStepV2 = translateToMablStepV2;
const EnterTextStep_1 = require("@mablhq/test-model/mobile/steps/EnterTextStep");
const TapStep_1 = require("@mablhq/test-model/mobile/steps/TapStep");
const MablStepAdapter_1 = require("./mablscript/canonical/MablStepAdapter");
const SetOrientationStep_1 = require("@mablhq/test-model/mobile/steps/SetOrientationStep");
const ScrollStep_1 = require("@mablhq/test-model/mobile/steps/ScrollStep");
const NavigateBackStep_1 = require("@mablhq/test-model/mobile/steps/NavigateBackStep");
const NavigateHomeStep_1 = require("@mablhq/test-model/mobile/steps/NavigateHomeStep");
const PushFileStep_1 = require("@mablhq/test-model/mobile/steps/PushFileStep");
const PrepareSessionStep_1 = require("@mablhq/test-model/mobile/steps/PrepareSessionStep");
const OpenLinkStep_1 = require("@mablhq/test-model/mobile/steps/OpenLinkStep");
const HideKeyboardStep_1 = require("@mablhq/test-model/mobile/steps/HideKeyboardStep");
const OpenAppStep_1 = require("@mablhq/test-model/mobile/steps/OpenAppStep");
const StepGroupStep_1 = require("@mablhq/test-model/steps/StepGroupStep");
const importer_1 = require("@mablhq/test-model/importer");
function translateToMablStepV2(message) {
    let step;
    switch (message.stepName) {
        case EnterTextStep_1.EnterTextStep.stepName:
            step = new EnterTextStep_1.EnterTextStep(message.mablStep);
            break;
        case HideKeyboardStep_1.HideKeyboardStep.stepName:
            step = new HideKeyboardStep_1.HideKeyboardStep(message.mablStep);
            break;
        case NavigateBackStep_1.NavigateBackStep.stepName:
            step = new NavigateBackStep_1.NavigateBackStep(message.mablStep);
            break;
        case NavigateHomeStep_1.NavigateHomeStep.stepName:
            step = new NavigateHomeStep_1.NavigateHomeStep(message.mablStep);
            break;
        case OpenAppStep_1.OpenAppStep.stepName:
            step = new OpenAppStep_1.OpenAppStep(message.mablStep);
            break;
        case OpenLinkStep_1.OpenLinkStep.stepName:
            step = new OpenLinkStep_1.OpenLinkStep(message.mablStep);
            break;
        case PrepareSessionStep_1.PrepareSessionStep.stepName:
            step = new PrepareSessionStep_1.PrepareSessionStep(message.mablStep);
            break;
        case PushFileStep_1.PushFileStep.stepName:
            step = new PushFileStep_1.PushFileStep(message.mablStep);
            break;
        case ScrollStep_1.ScrollStep.stepName:
            step = new ScrollStep_1.ScrollStep(message.mablStep);
            break;
        case SetOrientationStep_1.SetOrientationStep.stepName:
            step = new SetOrientationStep_1.SetOrientationStep(message.mablStep);
            break;
        case StepGroupStep_1.StepGroupStep.stepName:
            step = new StepGroupStep_1.StepGroupStep(message.mablStep, importer_1.interpretStepsFromObjects);
            break;
        case TapStep_1.TapStep.stepName:
            step = new TapStep_1.TapStep(message.mablStep);
            break;
        default:
            throw new Error(`Could not create step for step type: [${message.stepName}]`);
    }
    return new MablStepAdapter_1.MablStepAdapter(step);
}
