import{aa as _}from"./_applist-tangy-colts-beg-36.js";import{_ as s}from"./main-tangy-colts-beg.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import{h as r}from"./commonut-tangy-colts-beg-953.js";import{f as a}from"./machineh-tangy-colts-beg-110.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const u=_(({helpers:o})=>({states:{components:[{componentName:o.componentName.select,id:"user-role",label:s("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:s("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:s("Map Custom User Role"),onChange:"SWITCH_USER_ROLE",render:!0,value:!1}]},actions:{SHOW_IF_CUSTOM_USER_ROLE_MAPPING_DISABLE:({$:e})=>{var t;return((t=e.getComponent("switch-user-role"))==null?void 0:t.value)===!1},SHOW_IF_CUSTOM_USER_ROLE_MAPPING_ENABLED:({$:e})=>{var t;return((t=e.getComponent("switch-user-role"))==null?void 0:t.value)===!0},ON_MACHINE_LOAD:async({$:e})=>{l(e,[{db:"userRole",id:"user-role"},{db:"customUserRole",id:"custom-user-role"},{db:"switchUserRole",id:"switch-user-role"}]),await a(e)},REFETCH_USER_ROLES:async({$:e})=>{await a(e)},HANDLE_CUSTOM_USER_ROLE:r("customUserRole"),HANDLE_USER_ROLE:r("userRole"),SWITCH_USER_ROLE:r("switchUserRole")}}));export{u as default};
