import{_ as b,d as g,O as A,s as N,z as w,o as r,c as o,F as j,A as C,n as h,a as c,f as l,h as i,t as p,w as B,j as D,i as O}from"./entry-d195bacb.mjs";const S=g({name:"DocsAsideTree",props:{links:{type:Array,default:()=>[]},level:{type:Number,default:0},max:{type:Number,default:null},parent:{type:Object,default:null}},setup(m,{expose:d}){d();const t=m,a=A();function _(n){return n.exact?a.path===n._path:a.path.startsWith(n._path)}const u=N(()=>t.links.some(n=>n.children)),s={props:t,route:a,isActive:_,hasNesting:u};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}}),T={key:0,class:"flex items-center justify-between pt-2 text-sm font-semibold text-gray-900 dark:text-gray-200"},k={class:"inline-flex items-center"},z={class:"inline-flex items-center"};function F(m,d,t,a,_,u){const s=D,n=O,f=w("DocsAsideTree",!0);return r(),o("ul",null,[(r(!0),o(j,null,C(t.links,(e,v)=>{var x,y;return r(),o("li",{key:e._path,class:h(["transition-colors transition-base",{"ml-2":(x=t.parent)==null?void 0:x.icon,"pl-4":t.level>0&&e.children,"border-l":t.level>0||!a.hasNesting,"border-primary-400 dark:border-primary-600":a.isActive(e),"hover:border-gray-300 border-gray-100 dark:border-gray-700 hover:dark:border-gray-500":!a.isActive(e)}])},[e.children?(r(),o("div",T,[c("span",k,[e.icon?(r(),l(s,{key:0,name:e.icon,class:"w-4 h-4 mr-2"},null,8,["name"])):i("",!0),c("span",null,p(e.title),1)])])):(r(),l(n,{key:1,to:e._path,class:h(["flex items-center justify-between text-sm py-1.5",{"pl-4":t.level>0||!a.hasNesting,"!pt-0":t.level===0&&v===0,"text-primary font-medium":a.isActive(e),"text-gray-600 hover:text-gray-800 dark:text-gray-300 dark:hover:text-gray-200":!a.isActive(e)}]),exact:e.exact},{default:B(()=>[c("span",z,[e.icon?(r(),l(s,{key:0,name:e.icon,class:"w-4 h-4 mr-1"},null,8,["name"])):i("",!0),c("span",null,p(e.title),1)])]),_:2},1032,["to","exact","class"])),((y=e.children)==null?void 0:y.length)&&(t.max===null||t.level+1<t.max)?(r(),l(f,{key:2,links:e.children,level:t.level+1,parent:e,max:t.max,class:"py-2"},null,8,["links","level","parent","max"])):i("",!0)],2)}),128))])}var V=b(S,[["render",F]]);export{V as default};
