import{d as m,c as h,u as n,a as f,r as i,w as v,b as _,o as w,m as C}from"./index-DPl1iiyq.js";import{G as j}from"./Guide-Cg_R_4Uy.js";import"./navigation-BzNQiq4W.js";import"./__vite-browser-external-D7Ct-6yo.js";const B=m({__name:"GuideContentLoader",props:{project:{},page:{},version:{},versionNames:{},headerLinks:{},guide:{}},setup(r){const e=r,{state:u}=n(),c=h(()=>u.project?.versions?.[e.version.uid]?.guides[e.guide.uid]??e.guide),{fileHashes:d}=n(),l=f(),o=i(""),s=i({});async function p(){const t=e.page.uid;if(t)try{const a=await(await fetch(`http://localhost:${l.port}/content/${t}`)).json();o.value=a.html,s.value=a.headings}catch{console.error("Error loading static data",t)}}return v([()=>e.page.uid,()=>d[e.page.uid]],()=>p(),{immediate:!0}),(t,g)=>(w(),_(j,C(e,{guide:c.value,headings:s.value,html:o.value}),null,16,["guide","headings","html"]))}});export{B as default};
