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