import{aa as c,ab as d}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{h as a,s}from"./machine.-tangy-colts-beg-869.js";import{f as r,a as i,h as E,b as l,c as C}from"./sendycom-tangy-colts-beg-734.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 p=c(({helpers:n})=>({states:{components:[C(n),{allowClear:!0,componentName:n.componentName.select,fieldType:"config",helperText:o("Select the brand."),id:"brand-id",label:o("Brand"),onChange:"HANDLE_SELECT_BRAND",onRefetch:"REFETCH_BRAND",options:[],render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{allowClear:!0,componentName:n.componentName.select,fieldType:"config",helperText:o("Select the list to get active subscriber count."),id:"list-id",label:o("List"),onChange:"HANDLE_SELECT_LIST",onRefetch:"REFETCH_LIST",options:[],render:"IF_BRAND_SELECTED",required:!0,value:void 0}]},actions:{SET_CONNECTION:({$:e,e:t})=>{a("connectionId")({$:e,e:t}),i(e)},HANDLE_SELECT_BRAND:({$:e,e:t})=>{a("brandId")({$:e,e:t}),r(e)},CONNECTION_ADD_CHANGE:l,HANDLE_SELECT_LIST:a("listId"),HANDLE_SENDY_URL:E,IF_BRAND_SELECTED:({$:e})=>{var t;return d((t=e.getComponent("brand-id"))==null?void 0:t.value)},IF_CONNECTION_SELECTED:({$:e})=>{var t;return d((t=e.getComponent("connection-id"))==null?void 0:t.value)},REFETCH_BRAND:({$:e})=>i(e),REFETCH_LIST:({$:e})=>r(e),ON_MACHINE_LOAD:({$:e})=>{s(e,[{db:"connectionId",id:"connection-id"},{db:"sendyUrl",id:"sendy-url"},{db:"brandId",id:"brand-id"},{db:"listId",id:"list-id"}]),i(e)}}}));export{p as default};
