import{T as h}from"./app-BeFNDz9n.js";import{_ as p,r as v,ak as _,a$ as y,C as x,o as s,g as a,a as m,b as d,w as I,d as k,n as i,f as M,t as b,h as r,L,u as C,j as T}from"./app-BYcXwl4U.js";const V={class:"relative"},w=["href"],N={key:0},S={key:0,class:"not-italic"},g={key:1,class:"not-italic"},B={key:1},q={__name:"ChildLayout",props:["ctx","hasMenu","hasTab"],setup(n){const o=n;let l=o.ctx.leftMenuItems;o.ctx.tinyLeftMenuItems instanceof Array&&o.ctx.tinyLeftMenuItems.length>0&&(l=[{label:"当前路由规则",items:o.ctx.tinyLeftMenuItems}]);const c=v(),u=()=>{const t=document.querySelector(".main").scrollTop;o.hasMenu&&(c.value.style.top="max(calc(10.8em - "+t+"px), 5em)")};return _(()=>{document.querySelector(".main").addEventListener("scroll",u);const t=c.value.querySelector(".p-menu-item-link.t-active-item");t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView())}),y(()=>{document.querySelector(".main").removeEventListener("scroll",u)}),(t,D)=>{const f=x("ripple");return s(),a("div",V,[m("div",{ref_key:"leftBoxRef",ref:c,class:i(["left-box",{disabled:n.ctx.leftMenuItemIsDisabled,"has-menu":n.hasMenu,"has-tab":n.hasTab}])},[d(h,{items:C(l),class:"mb-14"},{item:I(({item:e,props:E})=>[e.name!="-"?k((s(),a("a",{key:0,class:i(["p-menu-item-link",{"t-active-item":e.isActive,on:e.isOn,off:e.isOff||e.isImportant}]),href:e.url},[e.name!="-"?(s(),a("span",N,[M(b(e.name),1),e.isOff?(s(),a("var",S,"关")):r("",!0),e.isImportant?(s(),a("var",g,"开")):r("",!0)])):r("",!0)],10,w)),[[f]]):(s(),a("span",B,[d(L)]))]),_:1},8,["items"])],2),m("div",{class:i(["right-box",{"has-menu":n.hasMenu}])},[T(t.$slots,"default",{},void 0,!0)],2)])}}},A=p(q,[["__scopeId","data-v-ca200076"]]);export{A as C};
