import{e as g,V as A,Z as C,E as c,ao as P,b as w,o as i,f as B,u as d,c as k,w as D,k as N,h as F,ap as V,q as b,s as E}from"./entry.5c8819da.js";const $=()=>{const{navPageFromPath:_,navDirFromPath:n,navKeyFromPath:p}=P(),{navigation:o,page:u}=g(),r=A(),l=C(),t=c(()=>p(l.path,"aside",o.value||[])),v=c(()=>{var e,a,s;return typeof((e=t.value)==null?void 0:e.level)<"u"?(a=t.value)==null?void 0:a.level:((s=r.value.aside)==null?void 0:s.level)||0}),x=c(()=>{var e;return((e=r.value.aside)==null?void 0:e.exclude)||[]});return{tree:c(()=>{var s,f,h;let e=o.value||[],a=l.path;if((s=t.value)!=null&&s.root&&(a=(f=t.value)==null?void 0:f.root,e=n(a,e)),v.value){const y=a.split("/").splice(0,1+v.value).join("/");e=n(y,e)||[],Array.isArray(e)||(e=[e])}if(e.length===0){if(e=_(((h=u.value)==null?void 0:h._path)||"/",o.value||[]),!e)return[];Array.isArray(e)||(e=[e])}return e.filter(m=>!x.value.includes(m._path))}),asideConfig:t}},j=F("span",{class:"ml-2"},"Go back",-1),H=w({__name:"DocsAside",setup(_){const{tree:n}=$();return(p,o)=>{var t;const u=V,r=b,l=E;return i(),B("nav",null,[((t=d(n))==null?void 0:t.length)>0?(i(),k(u,{key:0,links:d(n)},null,8,["links"])):(i(),k(l,{key:1,to:"/",class:"flex items-center text-sm cursor-pointer u-text-gray-500 hover:u-text-gray-700"},{default:D(()=>[N(r,{name:"heroicons-outline:arrow-left",class:"w-4 h-4"}),j]),_:1}))])}}});export{H as _};
