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