import { isArray, isPlainObject } from 'lodash';
// Saved in the DSL. Not the same strings as what gets used in the runtime
export 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 || (TriggerStepType = {}));
export function isValidStepDef(step) {
    if (isPlainObject(step)) {
        return 'type' in step;
    }
    return false;
}
export function isValidMultiStepDef(steps) {
    if (isArray(steps)) {
        return steps.every(isValidStepDef);
    }
    return false;
}
//# sourceMappingURL=event.js.map