1import{X as U,A as z,B as a,c,i as b,e as f,b as k,n as i,t as _,w as x,a7 as d,au as F,ao as O,ak as R,o as s,l as T,d as j,F as D,h as E,aR as P}from"#entry";import{g as y}from"./DOOQ-JSz.js";const X=["aria-expanded"],q={key:0,class:"px-2 pb-2 space-y-2"},G="flex items-center w-full text-left sidebar-navigation-item",H="block sidebar-navigation-item",J=U({__name:"SidebarNavigationItem",props:{item:{},level:{}},setup(l){const n=l,o=n.level??1,C=P(),t=z(!1),h=a(()=>Array.isArray(n.item.children)&&n.item.children.length>0);function u(e){const v=[y(e.link)];if(e.children)for(const m of e.children)v.push(...u(m));return v}const g=a(()=>C.path.replace(/\/$/,"")),$=a(()=>u(n.item).map(e=>e.replace(/\/$/,""))),r=a(()=>$.value.includes(g.value)),N=a(()=>n.item.children?n.item.children.some(e=>u(e).includes(g.value)):!1);t.value=r.value||N.value;function A(){t.value=!t.value}const B={1:"pl-4 hover:bg-background-200",2:"pl-2 hover:bg-background-300 hover:text-gray-900",3:"pl-4 hover:bg-white"},L={1:"pl-12 hover:bg-background-100",2:"pl-10 hover:bg-background-300 hover:text-gray-900",3:"pl-8 hover:bg-primary-900 hover:text-white"},S=a(()=>`${G} ${B[o]??""}`),w=a(()=>`${H} ${L[o]??""}`);return(e,v)=>{const m=O,I=R,V=K;return s(),c("li",{class:i(["sidebar-navigation-list-item rounded-lg space-y-2",[`level-${d(o)}`,{"is-active":r.value||t.value}]])},[b("div",null,[h.value?(s(),c("button",{key:0,"aria-expanded":t.value,class:i([S.value,{"is-active":r.value}]),onClick:A},[f(m,{name:"24/chevron-right",size:"24",class:i(["transition-transform",{"-rotate-90":t.value}])},null,8,["class"]),b("span",{class:i({"font-medium":t.value})},_(l.item.name),3)],10,X)):(s(),k(I,{key:1,to:("getSbUrl"in e?e.getSbUrl:d(y))(l.item.link),class:i([w.value,{"is-active":r.value}])},{default:x(()=>[T(_(l.item.name),1)]),_:1},8,["to","class"]))]),f(F,{name:"fade"},{default:x(()=>[h.value&&t.value?(s(),c("ul",q,[(s(!0),c(D,null,E(l.item.children,p=>(s(),k(V,{key:p._uid,item:p,level:d(o)+1},null,8,["item","level"]))),128))])):j("",!0)]),_:1})],2)}}}),K=Object.assign(J,{__name:"SidebarNavigationItem"});export{K as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.