
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.github.io
 */

import{d as M,N as C,u as k,a8 as x,r as l,a as y,X as B,g as r,c as i,b as u,i as e,Q as t,e as p,w as R,F as H,s as N,ad as T,y as S,M as w,A as $,j,l as z}from"./index-nGFMSQGw.js";import{u as V}from"./index-CyI3Kccs.js";import{_ as E}from"./index.vue_vue_type_script_setup_true_lang-irk5Dcs5.js";import{_ as F}from"./index.vue_vue_type_script_setup_true_lang-rI-Pc7n4.js";import"./sub.vue_vue_type_script_setup_true_lang-OSUVSBng.js";import"./item.vue_vue_type_script_setup_true_lang-DFSQ8avw.js";import"./HTooltip.vue_vue_type_script_setup_true_lang-BEZk-UXU.js";const O=M({name:"SubSidebar",__name:"index",setup(q){const f=C(),s=k(),c=x(),n=l(),b=l(!1),g=l(!1);function d(){const o=n.value.scrollTop;b.value=o>0;const a=n.value.clientHeight,m=n.value.scrollHeight;g.value=Math.ceil(o+a)<m}const h=l();return y(()=>{d();const{height:o}=V(h);B(()=>o.value,()=>{o.value>0&&d()},{immediate:!0})}),(o,a)=>{const m=j;return r(),i("div",{class:t(["sub-sidebar-container",{"is-collapse":e(s).mode==="pc"&&e(s).settings.menu.subMenuCollapse}])},[u(E,{"show-logo":e(s).settings.menu.menuMode==="single",class:t(["sidebar-logo",{"sidebar-logo-bg":e(s).settings.menu.menuMode==="single"}])},null,8,["show-logo","class"]),p("div",{ref_key:"subSidebarRef",ref:n,class:t(["sub-sidebar flex-1 transition-shadow-300",{"shadow-top":e(b),"shadow-bottom":e(g)}]),onScroll:d},[p("div",{ref_key:"menuRef",ref:h},[u(T,{name:"sub-sidebar"},{default:R(()=>[(r(!0),i(H,null,N(e(c).allMenus,(v,_)=>S((r(),i("div",{key:_},[u(F,{menu:v.children,value:e(f).meta.activeMenu||e(f).path,"default-openeds":e(c).defaultOpenedPaths,accordion:e(s).settings.menu.subMenuUniqueOpened,collapse:e(s).mode==="pc"&&e(s).settings.menu.subMenuCollapse,class:"menu"},null,8,["menu","value","default-openeds","accordion","collapse"])],512)),[[w,_===e(c).actived]])),128))]),_:1})],512)],34),e(s).mode==="pc"?(r(),i("div",{key:0,class:t(["relative flex items-center px-4 py-3",[e(s).settings.menu.subMenuCollapse?"justify-center":"justify-end"]])},[S(p("span",{class:t(["flex-center cursor-pointer rounded bg-stone-1 p-2 transition dark-bg-stone-9 hover-bg-stone-2 dark-hover-bg-stone-8",{"-rotate-z-180":e(s).settings.menu.subMenuCollapse}]),onClick:a[0]||(a[0]=v=>e(s).toggleSidebarCollapse())},[u(m,{name:"toolbar-collapse"})],2),[[w,e(s).settings.menu.enableSubMenuCollapseButton]])],2)):$("",!0)],2)}}}),U=z(O,[["__scopeId","data-v-61f98f34"]]);export{U as default};
