import{aa as c,ab as m}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{s as d}from"./machine.-tangy-colts-beg-869.js";import{h as s,c as l}from"./commonut-tangy-colts-beg-392.js";import{a as i}from"./machineh-tangy-colts-beg-858.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const h=c(({helpers:o})=>({states:{components:[l(o),{componentName:o.componentName.input,fieldType:"config",id:"contact-id",label:n("Contact Id"),onChange:"HANDLE_CONTACT_INFO",render:"IF_CONNECTION_SELECTED",type:"text",value:void 0},{addItemButtonLabel:"Add Column",componentName:o.componentName.repeaterField,fieldsMetaData:[{componentName:o.componentName.select,label:n("Field"),name:"omnisendField",options:[],required:!0,showSearch:!0,style:{width:200},value:""},{componentName:o.componentName.mixInput,label:n("Value"),name:"value",required:!0,value:[],wrapperClassName:"w-100"}],id:"row-data",label:n("Field Mapping"),onChange:"ON_CHANGE_ROW_DATA",path:"rowData",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{IF_CONNECTION_SELECTED:({$:e})=>{var t;return m((t=e.getComponent("connection-id"))==null?void 0:t.value)},HANDLE_CONTACT_INFO:async({$:e,e:t})=>{e.setThisComponent(a=>{a.value=t.target.value}),e.setDb(a=>{a.contactId=t.target.value})},ON_CHANGE_ROW_DATA:({$:e,e:t})=>{e.setThisComponent(a=>{a.value=t}),e.setDb(a=>{a.rowData=t})},ON_MACHINE_LOAD:async({$:e})=>{d(e,[{db:"connectionId",id:"connection-id"},{db:"rowData",id:"row-data"},{db:"contactId",id:"contact-id"}]),await i(e)},SET_CONNECTION:async({$:e,e:t})=>{e.setThisComponent(a=>{a.value=t}),e.setDb(a=>{a.connectionId=t}),await i(e)},CONNECTION_ADD_CHANGE:s}}));export{h as default};
