import{aR as s}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 i=async()=>s("pro_fluentbooking/get/events",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 n=async t=>{t.setComponent("form-id",e=>{e.loading=!0});const{data:o,status:a}=await i();if(a==="error"){t.setComponent("form-id",e=>{t.util.isSelectComponent(e)&&(e.status=a,e.loading=!1,e.invalidMessage=o)}),console.error("Failed to fetch form");return}t.setComponent("form-id",e=>{t.util.isSelectComponent(e)&&(e.options=o,e.loading=!1,e.status=void 0)})};export{n as f};
