import{aR as l}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,o){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,o),o)}};const a=async()=>l("pro_get_all_paid_membership_pro_level",void 0,void 0,"GET");globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,o){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,o),o)}};const r=async t=>{t.setComponent("pro-level-id",e=>{e.loading=!0});const{data:o,status:s}=await a();if(s==="error"){t.setComponent("pro-level-id",e=>{t.util.isSelectComponent(e)&&(e.status=s,e.loading=!1,e.invalidMessage=o)}),console.error("Failed to fetch pro-level");return}t.setComponent("pro-level-id",e=>{t.util.isSelectComponent(e)&&(e.options=o,e.loading=!1,e.status=void 0)})},c=async t=>{t.setComponent("membership-levels",e=>{e.loading=!0});const{data:o,status:s}=await a();if(s==="error"){t.setComponent("membership-levels",e=>{t.util.isSelectComponent(e)&&(e.status=s,e.loading=!1,e.invalidMessage=o)});return}t.setComponent("membership-levels",e=>{t.util.isSelectComponent(e)&&(e.options=o.filter(i=>i.value!=="any"),e.loading=!1,e.status=void 0)})};export{r as a,c as f};
