
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * Gitee  https://gitee.com/hooray/fantastic-admin
 * Github https://github.com/hooray/fantastic-admin
 */
  
import{ah as z,d as x,y as F,u as M,o as l,c as u,a as k,b as e,M as v,e as t,f as o,J as c,w as y,v as S,I as w,k as d,t as C,_ as j,h as i,m as D,n as I}from"./index-4eef28ae.js";import{a as O}from"./index-626bf66d.js";function R(){function g(){z.push({name:"reload"})}return{reload:g}}const A={class:"tools"},E={class:"buttons"},J={class:"user-wrapper"},U=x({name:"Tools"}),q=x({...U,setup(g){const p=D(),n=F(),f=M(),B=R(),{isFullscreen:N,toggle:h}=O();function T(b){switch(b){case"home":p.push({name:"home"});break;case"setting":p.push({name:"personalSetting"});break;case"hotkeys":v.emit("global-hotkeys-intro-toggle");break;case"logout":f.logout().then(()=>{p.push({name:"login"})});break}}return(b,s)=>{const a=j,r=i("el-icon"),$=i("el-avatar"),m=i("el-dropdown-item"),P=i("el-dropdown-menu"),V=i("el-dropdown");return l(),u("div",A,[k("div",E,[e(n).settings.navSearch.enable?(l(),u("span",{key:0,class:"item",onClick:s[0]||(s[0]=_=>e(v).emit("global-search-toggle"))},[t(r,null,{default:o(()=>[t(a,{name:"ep:search"})]),_:1})])):c("",!0),e(n).mode==="pc"&&e(n).settings.toolbar.enableFullscreen?(l(),u("span",{key:1,class:"item",onClick:s[1]||(s[1]=(..._)=>e(h)&&e(h)(..._))},[t(r,null,{default:o(()=>[t(a,{name:e(N)?"fullscreen-exit":"fullscreen"},null,8,["name"])]),_:1})])):c("",!0),e(n).settings.toolbar.enablePageReload?(l(),u("span",{key:2,class:"item",onClick:s[2]||(s[2]=_=>e(B).reload())},[t(r,null,{default:o(()=>[t(a,{name:"ep:refresh-right"})]),_:1})])):c("",!0),e(n).settings.toolbar.enableColorScheme?(l(),u("span",{key:3,class:"item",onClick:s[3]||(s[3]=_=>e(n).setColorScheme(e(n).settings.app.colorScheme==="dark"?"light":"dark"))},[t(r,null,{default:o(()=>[y(t(a,{name:"ep:sunny"},null,512),[[S,e(n).settings.app.colorScheme==="light"]]),y(t(a,{name:"ep:moon"},null,512),[[S,e(n).settings.app.colorScheme==="dark"]])]),_:1})])):c("",!0)]),t(V,{class:"user-container",size:"default",onCommand:T},{dropdown:o(()=>[t(P,{class:"user-dropdown"},{default:o(()=>[e(n).settings.home.enable?(l(),w(m,{key:0,command:"home"},{default:o(()=>[d(C(e(n).settings.home.title),1)]),_:1})):c("",!0),t(m,{command:"setting"},{default:o(()=>[d(" 个人设置 ")]),_:1}),e(n).mode==="pc"?(l(),w(m,{key:1,divided:"",command:"hotkeys"},{default:o(()=>[d(" 快捷键介绍 ")]),_:1})):c("",!0),t(m,{divided:"",command:"logout"},{default:o(()=>[d(" 退出登录 ")]),_:1})]),_:1})]),default:o(()=>[k("div",J,[t($,{size:"small"},{default:o(()=>[t(r,null,{default:o(()=>[t(a,{name:"ep:user-filled"})]),_:1})]),_:1}),d(" "+C(`${e(f).username||"Nine Ai"} `)+" ",1),t(r,null,{default:o(()=>[t(a,{name:"ep:caret-bottom"})]),_:1})])]),_:1})])}}});const G=I(q,[["__scopeId","data-v-ad60bb95"]]),L=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"}));export{G as T,L as i,R as u};
