import{aa as m}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 a}from"./commonut-tangy-colts-beg-953.js";import{f as r}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=m(({helpers:o})=>({states:{components:[{componentName:o.componentName.select,id:"user-role",label:s("Select User Role"),onChange:"SELECT_USER_ROLE",onRefetch:"REFETCH_USER_ROLE",options:[],path:"userRole",render:"SHOULD_SHOW_USER_ROLE_SELECT",required:!0,value:void 0},{componentName:o.componentName.mixInput,id:"custom-user-role",label:s("Custom User Role"),onChange:"HANDLE_CUSTOM_ROLES",path:"customUserRoles",render:"SHOULD_SHOW_CUSTOM_USER_ROLE",required:!0,value:void 0},{componentName:o.componentName.switch,fieldType:"config",id:"map-custom-role",label:s("Map Custom User Role"),onChange:"HANDLE_CUSTOM_ROLE_ENABLE",path:"mapCustomRole",render:!0,value:!1,wrapperClassName:"my-1"}]},actions:{SHOULD_SHOW_USER_ROLE_SELECT:({$:e})=>{var t;return((t=e.getComponent("map-custom-role"))==null?void 0:t.value)===!1},SHOULD_SHOW_CUSTOM_USER_ROLE:({$:e})=>{var t;return((t=e.getComponent("map-custom-role"))==null?void 0:t.value)===!0},HANDLE_CUSTOM_ROLE_ENABLE:a("mapCustomRole"),HANDLE_CUSTOM_ROLES:a("customUserRoles"),HANDLE_ROLE_CAPABILITIES:a("roleCapabilities"),SELECT_USER_ROLE:a("userRole"),ON_MACHINE_LOAD:async({$:e})=>{l(e,[{db:"userRole",id:"user-role"},{db:"customUserRoles",id:"custom-user-role"},{db:"mapCustomRole",id:"map-custom-role"}]),await r(e)},REFETCH_USER_ROLES:async({$:e})=>{await r(e)}}}));export{u as default};
