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