"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.stepToAIString = stepToAIString;
const mablscript_step_types_1 = require("../../mablscript-step-types");
const MablStepAdapter_1 = require("./MablStepAdapter");
const AccessibilityCheckStep_1 = require("./AccessibilityCheckStep");
const AssertStep_1 = require("./AssertStep");
const AssertVariableStep_1 = require("./AssertVariableStep");
const DownloadBaseStep_1 = require("./DownloadBaseStep");
const AwaitTabStep_1 = require("./AwaitTabStep");
const AwaitUploadStep_1 = require("./AwaitUploadStep");
const ClearCookiesStep_1 = require("./ClearCookiesStep");
const ClickStep_1 = require("./ClickStep");
const ClickAndHoldStep_1 = require("./ClickAndHoldStep");
const ElseStep_1 = require("./ElseStep");
const EndStep_1 = require("./EndStep");
const CreateVariableStep_1 = require("./CreateVariableStep");
const DatabaseQueryStep_1 = require("./DatabaseQueryStep");
const DoubleClickStep_1 = require("./DoubleClickStep");
const DownloadPdfStep_1 = require("./DownloadPdfStep");
const EchoStep_1 = require("./EchoStep");
const EnterAuthCodeStep_1 = require("./EnterAuthCodeStep");
const EnterTextStep_1 = require("./EnterTextStep");
const EvaluateJSStep_1 = require("./EvaluateJSStep");
const HoverStep_1 = require("./HoverStep");
const KeyPressStep_1 = require("./KeyPressStep");
const NavigationStep_1 = require("./NavigationStep");
const OpenEmailStep_1 = require("./OpenEmailStep");
const ReleaseStep_1 = require("./ReleaseStep");
const RemoveCookieStep_1 = require("./RemoveCookieStep");
const RightClickStep_1 = require("./RightClickStep");
const SelectStep_1 = require("./SelectStep");
const SendHttpRequestStep_1 = require("./SendHttpRequestStep");
const SetCookieStep_1 = require("./SetCookieStep");
const SetFilesStep_1 = require("./SetFilesStep");
const SwitchContextToStep_1 = require("./SwitchContextToStep");
const ViewportStep_1 = require("./ViewportStep");
const VisitUrlStep_1 = require("./VisitUrlStep");
const WaitStep_1 = require("./WaitStep");
const ExecuteFlowStep_1 = require("../extended/ExecuteFlowStep");
const ExecuteStepGroupStep_1 = require("../extended/ExecuteStepGroupStep");
function stepToAIString(step) {
    if ((0, mablscript_step_types_1.isMablStepAdapter)(step)) {
        return (0, MablStepAdapter_1.mablStepAdapterToAIString)(step);
    }
    switch (step.stepType) {
        case mablscript_step_types_1.StepType.ACCESSIBILITY_CHECK:
            return (0, AccessibilityCheckStep_1.accessibilityCheckStepToAIString)(step);
        case mablscript_step_types_1.StepType.ASSERTION:
            return (0, AssertStep_1.assertStepToAIString)(step);
        case mablscript_step_types_1.StepType.ASSERT_VARIABLE:
            return (0, AssertVariableStep_1.assertVariableStepToAIString)(step);
        case mablscript_step_types_1.StepType.AWAIT_DOWNLOAD:
            return (0, DownloadBaseStep_1.downloadBaseStepToAIString)(step);
        case mablscript_step_types_1.StepType.AWAIT_TAB:
            return (0, AwaitTabStep_1.awaitTabStepToAIString)(step);
        case mablscript_step_types_1.StepType.AWAIT_UPLOAD:
            return (0, AwaitUploadStep_1.awaitUploadStepToAIString)(step);
        case mablscript_step_types_1.StepType.CLEAR_COOKIES:
            return (0, ClearCookiesStep_1.clearCookiesStepToAIString)(step);
        case mablscript_step_types_1.StepType.CLICK:
            return (0, ClickStep_1.clickStepToAIString)(step);
        case mablscript_step_types_1.StepType.CLICK_HOLD:
            return (0, ClickAndHoldStep_1.clickAndHoldStepToAIString)(step);
        case mablscript_step_types_1.StepType.CONDITIONAL_ELSE:
            return (0, ElseStep_1.elseStepToAIString)(step);
        case mablscript_step_types_1.StepType.CONDITIONAL_END:
            return (0, EndStep_1.endStepToAIString)(step);
        case mablscript_step_types_1.StepType.CREATE_VARIABLE:
            return (0, CreateVariableStep_1.createVariableStepToAIString)(step);
        case mablscript_step_types_1.StepType.DATABASE_QUERY:
            return (0, DatabaseQueryStep_1.databaseQueryStepToAIString)(step);
        case mablscript_step_types_1.StepType.DOUBLE_CLICK:
            return (0, DoubleClickStep_1.doubleClickStepToAIString)(step);
        case mablscript_step_types_1.StepType.DOWNLOAD:
            return (0, DownloadBaseStep_1.downloadBaseStepToAIString)(step);
        case mablscript_step_types_1.StepType.DOWNLOAD_PDF:
            return (0, DownloadPdfStep_1.downloadPdfStepToAIString)(step);
        case mablscript_step_types_1.StepType.ECHO:
            return (0, EchoStep_1.echoStepToAIString)(step);
        case mablscript_step_types_1.StepType.ENTER_AUTH_CODE:
            return (0, EnterAuthCodeStep_1.enterAuthCodeStepToAIString)(step);
        case mablscript_step_types_1.StepType.ENTER_TEXT:
            return (0, EnterTextStep_1.enterTextStepToAIString)(step);
        case mablscript_step_types_1.StepType.EVALUATE_JS:
            return (0, EvaluateJSStep_1.evaluateJSStepToAIString)(step);
        case mablscript_step_types_1.StepType.HOVER:
            return (0, HoverStep_1.hoverStepToAIString)(step);
        case mablscript_step_types_1.StepType.KEYPRESS:
            return (0, KeyPressStep_1.keyPressStepToAIString)(step);
        case mablscript_step_types_1.StepType.NAVIGATE_BACK:
        case mablscript_step_types_1.StepType.NAVIGATE_HOME:
        case mablscript_step_types_1.StepType.NAVIGATION:
            return (0, NavigationStep_1.navigationStepToAIString)(step);
        case mablscript_step_types_1.StepType.OPEN_EMAIL:
            return (0, OpenEmailStep_1.openEmailStepToAIString)(step);
        case mablscript_step_types_1.StepType.RELEASE:
            return (0, ReleaseStep_1.releaseStepToAIString)(step);
        case mablscript_step_types_1.StepType.REMOVE_COOKIE:
            return (0, RemoveCookieStep_1.removeCookieStepToAIString)(step);
        case mablscript_step_types_1.StepType.RIGHT_CLICK:
            return (0, RightClickStep_1.rightClickStepToAIString)(step);
        case mablscript_step_types_1.StepType.SELECT:
            return (0, SelectStep_1.selectStepToAIString)(step);
        case mablscript_step_types_1.StepType.SEND_HTTP_REQUEST:
            return (0, SendHttpRequestStep_1.sendHttpRequestStepToAIString)(step);
        case mablscript_step_types_1.StepType.SET_COOKIE:
            return (0, SetCookieStep_1.setCookieStepToAIString)(step);
        case mablscript_step_types_1.StepType.SET_FILES:
            return (0, SetFilesStep_1.setFilesStepToAIString)(step);
        case mablscript_step_types_1.StepType.SWITCH_CONTEXT:
            return (0, SwitchContextToStep_1.switchContextToStepToAIString)(step);
        case mablscript_step_types_1.StepType.VIEWPORT:
        case mablscript_step_types_1.StepType.SET_VIEWPORT:
            return (0, ViewportStep_1.viewportStepToAIString)(step);
        case mablscript_step_types_1.StepType.VISIT_URL:
            return (0, VisitUrlStep_1.visitUrlStepToAIString)(step);
        case mablscript_step_types_1.StepType.WAIT:
            return (0, WaitStep_1.waitStepToAIString)(step);
        case mablscript_step_types_1.StepType.EXECUTE_FLOW:
            return (0, ExecuteFlowStep_1.executeFlowStepToAIString)(step);
        case mablscript_step_types_1.StepType.EXECUTE_STEP_GROUP:
            return (0, ExecuteStepGroupStep_1.executeStepGroupStepToAIString)(step);
        case mablscript_step_types_1.StepType.HIDE_KEYBOARD:
        case mablscript_step_types_1.StepType.OPEN_APP:
        case mablscript_step_types_1.StepType.OPEN_DEEP_LINK:
        case mablscript_step_types_1.StepType.PREPARE_SESSION:
        case mablscript_step_types_1.StepType.PUSH_FILE:
        case mablscript_step_types_1.StepType.SCROLL:
        case mablscript_step_types_1.StepType.SET_ORIENTATION:
        case mablscript_step_types_1.StepType.TAP:
        default:
            return `stepType: ${step.stepType}`;
    }
}
