import{h as c}from"./Dwvp_P-r.js";import{d,ar as f,I as r,as as m,s as p,aw as v,C as g}from"./Bxv1kRJt.js";import{f as h}from"./ODCdzakh.js";import{u as _}from"./Fma_4dAm.js";import{_ as y}from"./DafvsEAY.js";import"./Dv7rEyVi.js";const C=d({name:"ContentNavigation",props:{query:{type:Object,required:!1,default:void 0}},async setup(i){const{query:t}=m(i),a=p(()=>typeof t.value?.params=="function"?t.value.params():t.value);if(!a.value&&v("dd-navigation").value){const{navigation:o}=_();return{navigation:o}}const{data:e}=await g(`content-navigation-${c(a.value)}`,()=>h(a.value));return{navigation:e}},render(i){const t=f(),{navigation:a}=i,e=n=>r(y,{to:n._path},()=>n.title),o=(n,u)=>r("ul",u?{"data-level":u}:null,n.map(s=>s.children?r("li",null,[e(s),o(s.children,u+1)]):r("li",null,e(s)))),l=n=>o(n,0);return t?.default?t.default({navigation:a,...this.$attrs}):l(a)}}),L=C;export{L as default};
