import{aa as s,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 u,c as r}from"./mailchim-tangy-colts-beg-692.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 b=s(({helpers:n})=>({states:{components:[r(n),{allowClear:!0,componentName:n.componentName.select,helperText:t("Choose the list from which you want to get member's information. After selecting the List, Status and Count field will appear."),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},{allowClear:!0,componentName:n.componentName.select,helperText:t("Select a status to filter members by their subscription state (e.g., Subscribed, Unsubscribed)."),id:"status",label:t("Status"),onChange:"SET_STATUS",options:[{label:t("Subscribed"),value:"subscribed"},{label:t("Unsubscribed"),value:"unsubscribed"},{label:t("Cleaned"),value:"cleaned"},{label:t("Pending"),value:"pending"},{label:t("Transactional"),value:"transactional"}],path:"status",placeholder:t("Select a Status"),render:"IF_AUDIENCE_SELECTED",value:""},{componentName:n.componentName.mixInput,helperText:t("Enter the count value to specify the number of members to retrieve."),id:"count",label:t("Count"),onChange:"SET_COUNT",path:"count",render:"IF_AUDIENCE_SELECTED",value:[]}]},actions:{SET_CONNECTION:async({$:e,e:a})=>{o("connectionId")({$:e,e:a}),await i(e)},CONNECTION_ADD_CHANGE:u,HANDLE_SELECT_AUDIENCE:o("audienceList"),IF_AUDIENCE_SELECTED:({$:e})=>{var a;return c((a=e.getComponent("select-audience"))==null?void 0:a.value)},IF_CONNECTION_SELECTED:({$:e})=>{var a;return c((a=e.getComponent("connection-id"))==null?void 0:a.value)},REFETCH_AUDIENCE_LIST:async({$:e})=>await i(e),SET_COUNT:o("count"),SET_STATUS:o("status"),ON_MACHINE_LOAD:async({$:e})=>{var a;l(e,[{db:"connectionId",id:"connection-id"},{db:"audienceList",id:"select-audience"},{db:"status",id:"status"},{db:"count",id:"count"}]),(a=e.db)!=null&&a.connectionId&&await i(e)}}}));export{b as default};
