import{aa as m,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{s as r}from"./machine.-tangy-colts-beg-869.js";import{e as s,b as p,d,l as E,a as C,n as u}from"./hubspotc-tangy-colts-beg-518.js";import{a as n,h as N,c as S,e as i}from"./machineh-tangy-colts-beg-396.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,o){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,o),o)}};const F=m(({helpers:t})=>({states:{components:[S(t),{componentName:t.componentName.switch,fieldType:"config",helperText:e("Enable to update a contact if it exists, or add a new one if it does not."),id:"update-contact",label:e("Update Contact"),onChange:"SET_UPDATE_CONTACT",render:"IF_CONNECTION_SELECTED",size:"small",value:!1},{allowClear:!0,componentName:t.componentName.select,id:"employment-role",label:e("Employment Role"),onChange:"SET_ROLE",optionFilterProp:"label",options:s,path:"hs_role",placeholder:e("Select a Employment Role"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{allowClear:!0,componentName:t.componentName.select,id:"employment-seniority",label:e("Employment Seniority"),onChange:"SET_SENIORITY",optionFilterProp:"label",options:p,path:"hs_seniority",placeholder:e("Select a Employment Seniority"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{allowClear:!0,componentName:t.componentName.select,id:"employment-sub-role",label:e("Employment Sub Role"),onChange:"SET_SUB_ROLE",optionFilterProp:"label",options:d,path:"hs_sub_role",placeholder:e("Select a Employment Sub Role"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{allowClear:!0,componentName:t.componentName.select,id:"lead-status",label:e("Lead Status"),onChange:"SET_LEAD",optionFilterProp:"label",options:E,path:"hs_lead_status",placeholder:e("Select a Lead Status"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{allowClear:!0,componentName:t.componentName.select,id:"lifecycle-stage",label:e("Lifecycle Stage"),onChange:"SET_LIFECYCLE",optionFilterProp:"label",options:C,path:"lifecyclestage",placeholder:e("Select a Lifecycle Stage"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{allowClear:!0,componentName:t.componentName.select,id:"number-employees",label:e("Number Of Employees"),onChange:"SET_EMPLOYEES",optionFilterProp:"label",options:u,path:"numemployees",placeholder:e("Select Number Of Employees"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{addItemButtonLabel:e("Add Contact Fields"),componentName:t.componentName.repeaterField,direction:"horizontal",fieldsMetaData:[{componentName:t.componentName.select,label:e("Field"),name:"contactFields",optionFilterProp:"label",options:[],required:!0,showSearch:!0,style:{width:180},value:""},{componentName:t.componentName.mixInput,label:e("Value"),name:"value",required:!0,value:[],wrapperClassName:"w-100"}],id:"contact-field-list",inputGroupProps:{label:e("Field #{COUNT}")},label:e("Contact Fields"),onChange:"ON_CONTACT_FIELD_MAP",render:"IF_CONNECTION_SELECTED",value:[[{disabled:!0,name:"contactFields",value:"email"},{name:"value",value:[]}]]}]},actions:{CONNECTION_ADD_CHANGE:N,IF_CONNECTION_SELECTED:({$:o})=>{var a;return c((a=o.getComponent("connection-id"))==null?void 0:a.value)},SET_CONNECTION:async({$:o,e:a})=>{o.setThisComponent(l=>{l.value=a}),o.setDb(l=>{l.connectionId=a}),await i(o)},ON_CONTACT_FIELD_MAP:async({$:o,e:a})=>{o.setThisComponent(l=>{l.value=a}),o.setDb(l=>{l.contactFields=a}),await i(o)},SET_UPDATE_CONTACT:n("updateContact"),SET_ROLE:n("employmentRole"),SET_SENIORITY:n("employmentSeniority"),SET_SUB_ROLE:n("employmentSubRole"),SET_LEAD:n("leadSatus"),SET_LIFECYCLE:n("lifecycleStage"),SET_EMPLOYEES:n("numberOfEmployees"),ON_MACHINE_LOAD:async({$:o})=>{var a;r(o,[{db:"connectionId",id:"connection-id"},{db:"contactFields",id:"contact-field-list"},{db:"employmentRole",id:"employment-role"},{db:"employmentSeniority",id:"employment-seniority"},{db:"employmentSubRole",id:"employment-sub-role"},{db:"numberOfEmployees",id:"number-employees"},{db:"leadSatus",id:"lead-status"},{db:"lifecycleStage",id:"lifecycle-stage"}]),(a=o.db)!=null&&a.connectionId&&await i(o)}}}));export{F as default};
