import{aa as o}from"./_applist-tangy-colts-beg-36.js";import{_ as s}from"./main-tangy-colts-beg.js";import{s as _}from"./machine.-tangy-colts-beg-869.js";import{h as n}from"./commonut-tangy-colts-beg-953.js";import{g as t}from"./machineh-tangy-colts-beg-110.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(i,e){return this.cache.has(i)?this.cache.get(i):(this.cache.set(i,e),e)}};const A=o(({helpers:i})=>({states:{components:[{componentName:i.componentName.mixInput,id:"user-id",label:s("User Id"),onChange:"HANDLE_USER_ID",path:"userId",render:"SHOW_IF_EMAIL_MAPPING_DISABLED",required:!0,value:void 0},{componentName:i.componentName.mixInput,id:"user-email",label:s("User Email Address"),onChange:"HANDLE_USER_EMAIL",path:"userEmail",render:"SHOW_IF_EMAIL_MAPPING_ENABLED",required:!0,value:void 0},{componentName:i.componentName.switch,fieldType:"config",id:"switch-email-mapping",label:s("Map Email"),onChange:"SWITCH_EMAIL_MAPPING",render:!0,value:!1},{componentName:i.componentName.select,id:"user",label:s("Re-Assign User"),onChange:"HANDLE_REASSIGN_USER",onRefetch:"REFETCH_USERS",options:[],path:"reassignUser",render:"SHOW_IF_REASSIGN_ID_MAPPING_DISABLED",value:void 0},{componentName:i.componentName.mixInput,id:"custom-reassign-id",label:s("Re-Assign User Id"),onChange:"HANDLE_CUSTOM_REASSIGN_USER_ID",path:"customReassignId",render:"SHOW_IF_REASSIGN_ID_MAPPING_ENABLED",value:void 0},{componentName:i.componentName.switch,fieldType:"config",id:"switch-reassign-id",label:s("Map Custom User Id"),onChange:"SWITCH_REASSIGN_ID",render:!0,value:!1}]},actions:{SHOW_IF_EMAIL_MAPPING_DISABLED:({$:e})=>{var a;return((a=e.getComponent("switch-email-mapping"))==null?void 0:a.value)===!1},SHOW_IF_EMAIL_MAPPING_ENABLED:({$:e})=>{var a;return((a=e.getComponent("switch-email-mapping"))==null?void 0:a.value)===!0},SHOW_IF_REASSIGN_ID_MAPPING_DISABLED:({$:e})=>{var a;return((a=e.getComponent("switch-reassign-id"))==null?void 0:a.value)===!1},SHOW_IF_REASSIGN_ID_MAPPING_ENABLED:({$:e})=>{var a;return((a=e.getComponent("switch-reassign-id"))==null?void 0:a.value)===!0},REFETCH_USERS:async({$:e})=>{await t(e)},ON_MACHINE_LOAD:async({$:e})=>{_(e,[{db:"userId",id:"user-id"},{db:"userEmail",id:"user-email"},{db:"reassignUser",id:"user"},{db:"customReassignId",id:"custom-reassign-id"},{db:"switchEmailMapping",id:"switch-email-mapping"},{db:"switchReassignIdMapping",id:"switch-reassign-id"}]),await t(e)},HANDLE_CUSTOM_REASSIGN_USER_ID:n("customReassignId"),HANDLE_REASSIGN_USER:n("reassignUser"),HANDLE_USER_EMAIL:n("userEmail"),HANDLE_USER_ID:n("userId"),SWITCH_EMAIL_MAPPING:n("switchEmailMapping"),SWITCH_REASSIGN_ID:n("switchReassignId")}}));export{A as default};
