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