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