import{aR as i}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(s,e){return this.cache.has(s)?this.cache.get(s):(this.cache.set(s,e),e)}};const o=()=>i("pro_mail-mint/get-lists"),n=()=>i("pro_mail-mint/get-tags");globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(s,e){return this.cache.has(s)?this.cache.get(s):(this.cache.set(s,e),e)}};const l=async s=>{s.setComponent("lists",t=>{t.loading=!0});const{data:e,status:a}=await o();if(a==="error"){s.setComponent("lists",t=>{s.util.isSelectComponent(t)&&(t.status=a,t.loading=!1,t.invalidMessage=JSON.stringify(e))});return}s.setComponent("lists",t=>{s.util.isSelectComponent(t)&&(t.options=e,t.loading=!1,t.status=void 0)})},g=async s=>{s.setComponent("tags",t=>{t.loading=!0});const{data:e,status:a}=await n();if(a==="error"){s.setComponent("tags",t=>{s.util.isSelectComponent(t)&&(t.status=a,t.loading=!1,t.invalidMessage=JSON.stringify(e))});return}s.setComponent("tags",t=>{s.util.isSelectComponent(t)&&(t.options=e,t.loading=!1,t.status=void 0)})};export{g as a,l as f};
