"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TriggerStepType = void 0;
exports.isValidStepDef = isValidStepDef;
exports.isValidMultiStepDef = isValidMultiStepDef;
const lodash_1 = require("lodash");
// Saved in the DSL. Not the same strings as what gets used in the runtime
var TriggerStepType;
(function (TriggerStepType) {
    TriggerStepType["RUN_JS"] = "runJs";
    TriggerStepType["RUN_APIS"] = "executeApi";
    TriggerStepType["CANCEL_APIS"] = "cancelApi";
    TriggerStepType["NAVIGATE_TO"] = "navigateTo";
    TriggerStepType["NAVIGATE_TO_APP"] = "navigateToApp";
    TriggerStepType["NAVIGATE_TO_ROUTE"] = "navigateToRoute";
    TriggerStepType["SET_QUERY_PARAMS"] = "setQueryParams";
    TriggerStepType["CONTROL_SLIDEOUT"] = "controlSlideout";
    TriggerStepType["CONTROL_MODAL"] = "controlModal";
    TriggerStepType["CONTROL_TIMER"] = "controlTimer";
    TriggerStepType["RESET_COMPONENT"] = "resetComponent";
    TriggerStepType["RESET_STATE_VAR"] = "resetStateVar";
    TriggerStepType["SET_STATE_VAR"] = "setStateVar";
    TriggerStepType["SET_COMPONENT_PROPERTY"] = "setComponentProperty";
    TriggerStepType["SHOW_ALERT"] = "showAlert";
    TriggerStepType["SET_PROFILE"] = "setProfile";
    TriggerStepType["TRIGGER_EVENT"] = "triggerEvent";
    TriggerStepType["RUN_SUPERBLOCKS_OPTIMIZED_APIS"] = "optimizedPageLoadApis";
})(TriggerStepType || (exports.TriggerStepType = TriggerStepType = {}));
function isValidStepDef(step) {
    if ((0, lodash_1.isPlainObject)(step)) {
        return 'type' in step;
    }
    return false;
}
function isValidMultiStepDef(steps) {
    if ((0, lodash_1.isArray)(steps)) {
        return steps.every(isValidStepDef);
    }
    return false;
}
//# sourceMappingURL=event.js.map