import{b as _}from"./useflows-BpG3C9m1.js";import{e as r}from"./main-few-lands-burn.js";import{s as n}from"./machine.-BRuqPpdF.js";import{h as s}from"./commonut-D3rqJBtm.js";import{f as t}from"./machineh-D8WlVdMZ.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const c=_(({helpers:o})=>({states:{components:[{componentName:o.componentName.select,id:"user-role",label:r("Select User Roles"),onChange:"HANDLE_USER_ROLE",onRefetch:"REFETCH_USER_ROLES",options:[],path:"userRole",render:"SHOW_IF_CUSTOM_USER_ROLE_MAPPING_DISABLE",required:!0,value:void 0},{componentName:o.componentName.mixInput,id:"custom-user-role",label:r("Custom User Role"),onChange:"HANDLE_CUSTOM_USER_ROLE",path:"customUserRole",render:"SHOW_IF_CUSTOM_USER_ROLE_MAPPING_ENABLED",required:!0,value:void 0},{componentName:o.componentName.switch,fieldType:"config",id:"switch-user-role",label:r("Map Custom User Role"),onChange:"SWITCH_USER_ROLE",render:!0,value:!1}]},actions:{SHOW_IF_CUSTOM_USER_ROLE_MAPPING_DISABLE:({$:e})=>e.getComponent("switch-user-role")?.value===!1,SHOW_IF_CUSTOM_USER_ROLE_MAPPING_ENABLED:({$:e})=>e.getComponent("switch-user-role")?.value===!0,ON_MACHINE_LOAD:async({$:e})=>{n(e,[{db:"userRole",id:"user-role"},{db:"customUserRole",id:"custom-user-role"},{db:"switchUserRole",id:"switch-user-role"}]),await t(e)},REFETCH_USER_ROLES:async({$:e})=>{await t(e)},HANDLE_CUSTOM_USER_ROLE:s("customUserRole"),HANDLE_USER_ROLE:s("userRole"),SWITCH_USER_ROLE:s("switchUserRole")}}));export{c as default};
