import{aa as m,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import{h as o,f as i,a as E,c as d}from"./mailchim-tangy-colts-beg-692.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 _=m(({helpers:a})=>({states:{components:[d(a),{allowClear:!0,componentName:a.componentName.select,helperText:t("Choose the list from which you want to remove the member tag."),id:"select-audience",label:t("Select Audience List"),onChange:"HANDLE_SELECT_AUDIENCE",onRefetch:"REFETCH_AUDIENCE_LIST",options:[],path:"select-audience",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:a.componentName.mixInput,helperText:t("Enter the member's email from which you want to Add or Remove the tag."),id:"member-email",label:t("Member Email"),onChange:"SET_MEMBER_EMAIL",path:"member-email",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{addItemButtonLabel:"Add Tag",componentName:a.componentName.repeaterField,fieldsMetaData:[{componentName:a.componentName.mixInput,label:t("Tag Name"),name:"name",value:[],wrapperClassName:"w-100"},{componentName:a.componentName.select,label:t("Action"),name:"status",options:[{label:t("Active"),value:"active"},{label:t("Inactive"),value:"inactive"}],style:{width:150},value:""}],id:"tag-field-map",inputGroupProps:{label:t("Tag #{COUNT}")},label:t("Tag Field Map"),onChange:"ON_TAG_FIELD_MAP",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{SET_CONNECTION:async({$:e,e:n})=>{o("connectionId")({$:e,e:n}),await i(e)},CONNECTION_ADD_CHANGE:E,HANDLE_SELECT_AUDIENCE:o("audienceList"),IF_CONNECTION_SELECTED:({$:e})=>{var n;return c((n=e.getComponent("connection-id"))==null?void 0:n.value)},ON_TAG_FIELD_MAP:o("tagFieldMap"),REFETCH_AUDIENCE_LIST:async({$:e})=>await i(e),SET_MEMBER_EMAIL:o("memberEmail"),ON_MACHINE_LOAD:async({$:e})=>{var n;l(e,[{db:"connectionId",id:"connection-id"},{db:"audienceList",id:"select-audience"},{db:"memberEmail",id:"member-email"},{db:"tagFieldMap",id:"tag-field-map"}]),(n=e.db)!=null&&n.connectionId&&await i(e)}}}));export{_ as default};
