import{b as t}from"./useflows-BpG3C9m1.js";import{e as a}from"./main-few-lands-burn.js";import{s as o}from"./machine.-BRuqPpdF.js";import{h as s}from"./commonut-D3rqJBtm.js";import{g as n}from"./machineh-D8WlVdMZ.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const S=t(({helpers:i})=>({states:{components:[{componentName:i.componentName.mixInput,id:"user-id",label:a("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:a("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:a("Map Email"),onChange:"SWITCH_EMAIL_MAPPING",render:!0,value:!1},{componentName:i.componentName.select,id:"user",label:a("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:a("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:a("Map Custom User Id"),onChange:"SWITCH_REASSIGN_ID",render:!0,value:!1}]},actions:{SHOW_IF_EMAIL_MAPPING_DISABLED:({$:e})=>e.getComponent("switch-email-mapping")?.value===!1,SHOW_IF_EMAIL_MAPPING_ENABLED:({$:e})=>e.getComponent("switch-email-mapping")?.value===!0,SHOW_IF_REASSIGN_ID_MAPPING_DISABLED:({$:e})=>e.getComponent("switch-reassign-id")?.value===!1,SHOW_IF_REASSIGN_ID_MAPPING_ENABLED:({$:e})=>e.getComponent("switch-reassign-id")?.value===!0,REFETCH_USERS:async({$:e})=>{await n(e)},ON_MACHINE_LOAD:async({$:e})=>{o(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 n(e)},HANDLE_CUSTOM_REASSIGN_USER_ID:s("customReassignId"),HANDLE_REASSIGN_USER:s("reassignUser"),HANDLE_USER_EMAIL:s("userEmail"),HANDLE_USER_ID:s("userId"),SWITCH_EMAIL_MAPPING:s("switchEmailMapping"),SWITCH_REASSIGN_ID:s("switchReassignId")}}));export{S as default};
