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