text: import{_ as M,K as D,p as I,a as b,f as x,b as S,o as $}from"./index.e84e956c.js";import{A,aB as U,aA as v,j as N,a0 as n,B as t,D as O,w as s,a6 as m,a1 as f,ad as _,H as a,K as r,J as B,ab as V}from"./vendor.5879c5ca.js";import{D as E}from"./siteSetting.136c2269.js";import{c as w,u as P}from"./index.26d10332.js";import{b as R}from"./index.c505e96f.js";import{h as F}from"./header.d801b988.js";import"./index.96c912c6.js";import"./useWindowSizeFn.6a6adedd.js";import"./useContentViewHeight.ccc8749b.js";import"./useFrameKeepAlive.6cc008f1.js";/* empty css               *//* empty css               */import"./useSortable.a10c06e7.js";import"./lock.cd1c3bea.js";const H=A({name:"UserDropdown",components:{Dropdown:U,Menu:v,MenuItem:w(()=>D(()=>import("./DropMenuItem.c72df0d3.js"),["assets/DropMenuItem.c72df0d3.js","assets/vendor.5879c5ca.js","assets/vendor.484f97d2.css","assets/index.e84e956c.js","assets/index.378876c6.css"])),MenuDivider:v.Divider,LockAction:w(()=>D(()=>import("./LockModal.e5ed1ce2.js"),["assets/LockModal.e5ed1ce2.js","assets/LockModal.0068f88c.css","assets/index.0fd50022.css","assets/index.ccc15a38.css","assets/index.17eb4c41.css","assets/index.68a157e7.css","assets/index.3773f2c1.css","assets/index.b69bf908.css","assets/index.37bd946c.css","assets/index.e06a4543.css","assets/index.40281274.css","assets/index.dc18cb8f.css","assets/index.29449962.css","assets/index.faad7c60.css","assets/index.e84e956c.js","assets/index.378876c6.css","assets/vendor.5879c5ca.js","assets/vendor.484f97d2.css","assets/index.c505e96f.js","assets/index.61efae5a.css","assets/useWindowSizeFn.6a6adedd.js","assets/BasicForm.0ba2e15f.js","assets/BasicForm.cd14c661.css","assets/index.8b70aabd.js","assets/index.7b8b5e30.css","assets/uuid.2b29000c.js","assets/download.e6dbd100.js","assets/base64Conver.bb012c73.js","assets/index.e83a4b09.js","assets/index.88b1d373.css","assets/useForm.696aa965.js","assets/lock.cd1c3bea.js","assets/header.d801b988.js"]))},props:{theme:I.oneOf(["dark","light"])},setup(){const{prefixCls:e}=b("header-user-dropdown"),{t:g}=S(),{getShowDoc:k,getUseLockPage:h}=P(),i=x(),C=N(()=>{const{realName:u="",image:y,desc:L}=i.getUserInfo||{};return{realName:u,avatar:y||F,desc:L}}),[o,{openModal:c}]=R();function d(){c(!0)}function l(){i.confirmLoginOut()}function p(){$(E)}function j(u){switch(u.key){case"logout":l();break;case"doc":p();break;case"lock":d();break}}return{prefixCls:e,t:g,getUserInfo:C,handleMenuClick:j,getShowDoc:k,register:o,getUseLockPage:h}}}),K=["src"];function T(e,g,k,h,i,C){const o=n("MenuItem"),c=n("MenuDivider"),d=n("Menu"),l=n("Dropdown"),p=n("LockAction");return t(),O(V,null,[s(l,{placement:"bottomLeft",overlayClassName:`${e.prefixCls}-dropdown-overlay`},{overlay:m(()=>[s(d,{onClick:e.handleMenuClick},{default:m(()=>[e.getShowDoc?(t(),f(o,{key:"doc",text:e.t("layout.header.dropdownItemDoc"),icon:"ion:document-text-outline"},null,8,["text"])):_("",!0),e.getShowDoc?(t(),f(c,{key:1})):_("",!0),e.getUseLockPage?(t(),f(o,{key:"lock",text:e.t("layout.header.tooltipLock"),icon:"ion:lock-closed-outline"},null,8,["text"])):_("",!0),s(o,{key:"logout",text:e.t("layout.header.dropdownItemLoginOut"),icon:"ion:power-outline"},null,8,["text"])]),_:1},8,["onClick"])]),default:m(()=>[a("span",{class:r([[e.prefixCls,`${e.prefixCls}--${e.theme}`],"flex"])},[a("img",{class:r(`${e.prefixCls}__header`),src:e.getUserInfo.avatar},null,10,K),a("span",{class:r(`${e.prefixCls}__info hidden md:block`)},[a("span",{class:r([`${e.prefixCls}__name  `,"truncate"])},B(e.getUserInfo.realName),3)],2)],2)]),_:1},8,["overlayClassName"]),s(p,{onRegister:e.register},null,8,["onRegister"])],64)}var ae=M(H,[["render",T]]);export{ae as default};
  