import{e,r as a,ak as t,D as s,w as i,A as n,o,a as r,J as l,L as u,c as d,s as c,b as v,t as b,n as g,d as m,al as k,_ as p,q as _}from"./index-D8tPjwDN.js";const x={class:"navbar"},S=["onClick"],I=p(e({__name:"NavBar",setup(e){const p=JSON.parse(sessionStorage.getItem("token")||"{}"),_=[{id:1,label:"设备",route:"/index/setting/device"},{id:2,label:"网络",route:"/index/setting/network"},{id:3,label:"用户",route:"/index/setting/users"},{id:4,label:"系统",route:"/index/setting/version"},{id:5,label:"LIS",route:"/index/setting/lis"}],I=a(_[0].route),f=t(),w=s();i(f,(e=>{const a=_.find((a=>a.route===e.path));a&&(I.value=a.route,sessionStorage.setItem("activeTab",a.route))}));const y=sessionStorage.getItem("activeTab");return y&&(I.value=y,w.push(y)),(e,a)=>{const t=n("router-link");return o(),r("div",x,[(o(),r(l,null,u(_,((e,a)=>{return o(),r(l,{key:a},[(s=e.id,"Admin"===p.usrRole||2!=s?(o(),d(t,{key:0,to:e.route,class:"nav-item-link","active-class":"active"},{default:c((()=>[v("div",{class:g(["nav-item",{active:I.value===e.route}]),onClick:e=>(async e=>{I.value=_[e].route,await k()})(a)},b(e.label),11,S)])),_:2},1032,["to"])):m("",!0))],64);var s})),64))])}}}),[["__scopeId","data-v-b606ac59"]]),f=e({__name:"Setting",setup:e=>(e,a)=>{const t=n("router-view");return o(),r("div",null,[_(I),_(t)])}});export{f as default};
