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