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