import{h as c}from"./BLTKKlVT.js";import{d,ax as f,I as s,ay as m,s as p,aF as v,C as g}from"./DnBXlrVC.js";import{f as h}from"./CmkLgYB0.js";import{u as y}from"./B4ToemiP.js";import{_}from"./DVAt6LKG.js";import"./bZnb3lKL.js";import"./D_ZEyAD5.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}=y();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=>s(_,{to:n._path},()=>n.title),o=(n,u)=>s("ul",u?{"data-level":u}:null,n.map(r=>r.children?s("li",null,[e(r),o(r.children,u+1)]):s("li",null,e(r)))),l=n=>o(n,0);return t?.default?t.default({navigation:a,...this.$attrs}):l(a)}}),$=C;export{$ as default};
