import{d as m,s as h,v as n,x as f,y as i,z as v,b as _,o as C,m as j}from"./index-CDPBytck.js";import{G as k}from"./Guide-Db2M1XyO.js";import"./__vite-browser-external-D7Ct-6yo.js";import"./DocumentMobileHeader.vue-CtBquMK3.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)=>(C(),_(k,j(e,{guide:c.value,headings:s.value,html:o.value}),null,16,["guide","headings","html"]))}});export{B as default};
