import{aa as r,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import{h as c,c as u}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(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const E=r(({helpers:n})=>({states:{components:[u(n),{componentName:n.componentName.select,fieldType:"config",id:"subscriber-type",label:o("Subscriber Type"),mode:"multiple",onChange:"SELECT_SUBSCRIBER_TYPE",optionFilterProp:"label",options:[{label:o("Email"),value:"email"},{label:o("SMS"),value:"sms"}],placeholder:o("Select a Status"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:n.componentName.select,fieldType:"config",id:"subscriber-status",label:o("Subscriber Status"),onChange:"SELECT_SUBSCRIBER_STATUS",optionFilterProp:"label",options:[{label:o("Subscribed"),value:"subscribed"},{label:o("Unsubscribed"),value:"unsubscribed"},{label:o("nonSubscribed"),value:"nonSubscribed"}],placeholder:o("Select a Status"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{addItemButtonLabel:"Add Column",componentName:n.componentName.repeaterField,fieldsMetaData:[{componentName:n.componentName.select,label:o("Field"),name:"omnisendField",options:[],required:!0,showSearch:!0,style:{width:200},value:""},{componentName:n.componentName.mixInput,label:o("Value"),name:"value",required:!0,value:[],wrapperClassName:"w-100"}],id:"row-data",label:o("Field Mapping"),onChange:"ON_CHANGE_ROW_DATA",path:"rowData",render:"IF_STATUS_SELECTED",value:[]}]},actions:{IF_CONNECTION_SELECTED:({$:e})=>{var a;return s((a=e.getComponent("connection-id"))==null?void 0:a.value)},IF_STATUS_SELECTED:({$:e})=>{var a;return s((a=e.getComponent("subscriber-status"))==null?void 0:a.value)},ON_CHANGE_ROW_DATA:({$:e,e:a})=>{e.setThisComponent(t=>{t.value=a}),e.setDb(t=>{t.rowData=a})},ON_MACHINE_LOAD:async({$:e})=>{l(e,[{db:"connectionId",id:"connection-id"},{db:"subscriberStatus",id:"subscriber-status"},{db:"subscriberType",id:"subscriber-type"},{db:"rowData",id:"row-data"}]),await i(e)},SELECT_SUBSCRIBER_STATUS:async({$:e,e:a})=>{e.setThisComponent(t=>{t.value=a}),e.setDb(t=>{t.subscriberStatus=a})},SELECT_SUBSCRIBER_TYPE:async({$:e,e:a})=>{e.setThisComponent(t=>{t.value=a}),e.setDb(t=>{t.subscriberType=a})},SET_CONNECTION:async({$:e,e:a})=>{e.setThisComponent(t=>{t.value=a}),e.setDb(t=>{t.connectionId=a}),await i(e)},CONNECTION_ADD_CHANGE:c}}));export{E as default};
