import{aa as i,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as t,s as m}from"./machine.-tangy-colts-beg-869.js";import{h as d,a as l,c as T}from"./flowluco-tangy-colts-beg-376.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,o){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,o),o)}};const u=i(({helpers:n})=>({states:{components:[T(n),{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the account ID to update."),id:"account-id",label:e("Account ID"),onChange:"SET_ACCOUNT_ID",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the company name."),id:"name",label:e("Company Name"),onChange:"SET_NAME",render:"IF_ORGANIZATION_TYPE",required:!0,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the first name of the contact."),id:"first-name",label:e("First Name"),onChange:"SET_FIRST_NAME",render:"IF_CONTACT_TYPE",required:!1,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the last name of the contact."),id:"last-name",label:e("Last Name"),onChange:"SET_LAST_NAME",render:"IF_CONTACT_TYPE",required:!1,value:void 0},{allowClear:!0,componentName:n.componentName.select,fieldType:"config",helperText:e("Select the account type."),id:"account-type-id",label:e("Account Type"),onChange:"SET_ACCOUNT_TYPE_ID",options:[{label:e("Organization"),value:1},{label:e("Contact"),value:2}],render:"IF_CONNECTION_SELECTED",required:!1,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the email address of the account."),id:"email",label:e("Email"),onChange:"SET_EMAIL",render:"IF_CONNECTION_SELECTED",required:!1,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the phone number of the account."),id:"phone",label:e("Phone"),onChange:"SET_PHONE",render:"IF_CONNECTION_SELECTED",required:!1,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:e("Enter the position/title of the contact."),id:"position",label:e("Position"),onChange:"SET_POSITION",render:"IF_CONTACT_TYPE",required:!1,value:void 0}]},actions:{ON_MACHINE_LOAD:({$:o})=>{m(o,[{db:"connectionId",id:"connection-id"},{db:"accountId",id:"account-id"},{db:"name",id:"name"},{db:"firstName",id:"first-name"},{db:"lastName",id:"last-name"},{db:"accountTypeId",id:"account-type-id"},{db:"email",id:"email"},{db:"phone",id:"phone"},{db:"position",id:"position"}])},CONNECTION_ADD_CHANGE:l,SET_DOMAIN:d,SET_CONNECTION:t("connectionId"),SET_ACCOUNT_ID:t("accountId"),SET_NAME:t("name"),SET_FIRST_NAME:t("firstName"),SET_LAST_NAME:t("lastName"),SET_ACCOUNT_TYPE_ID:t("accountTypeId"),SET_EMAIL:t("email"),SET_PHONE:t("phone"),SET_POSITION:t("position"),IF_CONNECTION_SELECTED:({$:o})=>{var a;return c((a=o.getComponent("connection-id"))==null?void 0:a.value)},IF_CONTACT_TYPE:({$:o})=>{var a;return((a=o.getComponent("account-type-id"))==null?void 0:a.value)===2},IF_ORGANIZATION_TYPE:({$:o})=>{var a;return((a=o.getComponent("account-type-id"))==null?void 0:a.value)===1}}}));export{u as default};
