import{aa as i,ab as m}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as o,s as c}from"./machine.-tangy-colts-beg-869.js";import{h as E,a as r,c as d,u as l}from"./commonut-tangy-colts-beg-567.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const u=i(({helpers:e})=>({states:{components:[d(e),{componentName:e.componentName.mixInput,helperText:a("Enter contact ID for updates"),id:"contact-id",label:a("Contact ID"),onChange:"HANDLE_CONTACT_ID",path:"contactId",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:e.componentName.mixInput,helperText:a("Enter email address of the contact"),id:"email",label:a("Email Address"),onChange:"HANDLE_EMAIL",path:"email",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:e.componentName.mixInput,helperText:a("Enter first name of the contact"),id:"first-name",label:a("First Name"),onChange:"HANDLE_FIRST_NAME",path:"firstName",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:e.componentName.mixInput,helperText:a("Enter last name of the contact"),id:"last-name",label:a("Last Name"),onChange:"HANDLE_LAST_NAME",path:"lastName",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:e.componentName.mixInput,helperText:a("Enter phone-number of the contact"),id:"phone-number",label:a("Phone Number"),onChange:"HANDLE_PHONE_NUMBER",path:"phone",render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{CONNECTION_ADD_CHANGE:r,IF_CONNECTION_SELECTED:({$:t})=>{var n;return m((n=t.getComponent("connection-id"))==null?void 0:n.value)},ON_MACHINE_LOAD:({$:t})=>{c(t,[{db:"connectionId",id:"connection-id"},{db:"urlDb",id:"url"},{db:"firstName",id:"first-name"},{db:"lastName",id:"last-name"},{db:"phoneNumber",id:"phone-number"},{db:"emailDb",id:"email"},{db:"contactId",id:"contact-id"}]),l({$:t})},SET_CONNECTION:async({$:t,e:n})=>{t.setThisComponent(N=>{N.value=n}),t.setDb(N=>{N.connectionId=n,N.urlDb=""})},HANDLE_CONTACT_ID:o("contactId"),HANDLE_EMAIL:o("emailDb"),HANDLE_FIRST_NAME:o("firstName"),HANDLE_LAST_NAME:o("lastName"),HANDLE_PHONE_NUMBER:o("phoneNumber"),HANDLE_URL:E}}));export{u as default};
