import{aP as x,a as I,cE as M,aT as k,bj as b,aK as $,b as U,l as S,f as N,aQ as r,o as n,h as O,j as t,p as m,aR as h,aS as g,i as a,n as s,t as A,F as E,c as P,bm as R}from"./index.0d073eaa.js";import{D as V}from"./siteSetting.c485f07c.js";import{c as C,u as B}from"./index.c15ba425.js";import{b as T}from"./index.c05f9254.js";import{h as z}from"./header.d801b988.js";import"./FullscreenOutlined.401a7bcd.js";import"./index.7680e967.js";import"./useWindowSizeFn.ef20ece8.js";import"./useContentViewHeight.01b9d1c6.js";import"./uniqBy.ac0f9c38.js";import"./_baseIteratee.3919e7cf.js";import"./get.49a42f2e.js";import"./index.c9bfdeac.js";import"./index.78efd931.js";import"./useRefs.e81831e2.js";import"./PlusOutlined.64d8e001.js";import"./RedoOutlined.32117fb5.js";import"./index.aa6b7013.js";import"./lock.2102e909.js";const j=I({name:"UserDropdown",components:{Dropdown:M,Menu:k,MenuItem:C(()=>b(()=>import("./DropMenuItem.394a4900.js"),["assets/DropMenuItem.394a4900.js","assets/index.0d073eaa.js","assets/index.e3bb563e.css"])),MenuDivider:k.Divider,LockAction:C(()=>b(()=>import("./LockModal.486a8ecd.js"),["assets/LockModal.486a8ecd.js","assets/LockModal.0068f88c.css","assets/index.86d55544.css","assets/index.a18cc309.css","assets/index.0d073eaa.js","assets/index.e3bb563e.css","assets/index.c05f9254.js","assets/index.d0b877f3.css","assets/useWindowSizeFn.ef20ece8.js","assets/FullscreenOutlined.401a7bcd.js","assets/BasicForm.d11b68fd.js","assets/BasicForm.913136bc.css","assets/index.0fb15725.js","assets/index.3a3c1369.css","assets/index.965098be.js","assets/index.cb0992d5.css","assets/Checkbox.476f6e92.js","assets/index.1491cab6.js","assets/index.695a0c50.css","assets/index.e317a008.js","assets/index.49ada229.css","assets/index.7075e2b7.js","assets/index.47f7c782.css","assets/index.04f7e044.js","assets/index.579bd49e.css","assets/index.e8daa066.js","assets/index.7b8b5e30.css","assets/get.49a42f2e.js","assets/index.e8b360cf.js","assets/index.560eb672.css","assets/eagerComputed.156e81ff.js","assets/index.2b5ea4f6.js","assets/index.aeeee80c.css","assets/_baseIteratee.3919e7cf.js","assets/DeleteOutlined.247d1f35.js","assets/index.a8c197b8.js","assets/index.8f5fe29a.css","assets/useRefs.e81831e2.js","assets/Form.48352728.js","assets/Col.a2eadc78.js","assets/useFlexGapSupport.474c31b7.js","assets/useSize.bb4e5ce5.js","assets/index.81899e8a.js","assets/index.cd256673.css","assets/index.ffb8ac7d.js","assets/index.9d09be4d.css","assets/index.dd1f987c.js","assets/index.b1363280.css","assets/uuid.2b29000c.js","assets/download.bb4c9304.js","assets/base64Conver.08b9f4ec.js","assets/index.31930d74.js","assets/index.cb030764.css","assets/index.1d29734e.js","assets/uniqBy.ac0f9c38.js","assets/useForm.868c8e81.js","assets/lock.2102e909.js","assets/header.d801b988.js"]))},props:{theme:$.oneOf(["dark","light"])},setup(){const{prefixCls:e}=U("header-user-dropdown"),{t:f}=P(),{getShowDoc:_,getUseLockPage:v}=B(),d=S(),w=N(()=>{const{realName:u="",avatar:y,desc:L}=d.getUserInfo||{};return{realName:u,avatar:y||z,desc:L}}),[o,{openModal:i}]=T();function p(){i(!0)}function l(){d.confirmLoginOut()}function c(){R(V)}function D(u){switch(u.key){case"logout":l();break;case"doc":c();break;case"lock":p();break}}return{prefixCls:e,t:f,getUserInfo:w,handleMenuClick:D,getShowDoc:_,register:o,getUseLockPage:v}}}),F=["src"];function H(e,f,_,v,d,w){const o=r("MenuItem"),i=r("MenuDivider"),p=r("Menu"),l=r("Dropdown"),c=r("LockAction");return n(),O(E,null,[t(l,{placement:"bottomLeft",overlayClassName:`${e.prefixCls}-dropdown-overlay`},{overlay:m(()=>[t(p,{onClick:e.handleMenuClick},{default:m(()=>[e.getShowDoc?(n(),h(o,{key:"doc",text:e.t("layout.header.dropdownItemDoc"),icon:"ion:document-text-outline"},null,8,["text"])):g("",!0),e.getShowDoc?(n(),h(i,{key:1})):g("",!0),e.getUseLockPage?(n(),h(o,{key:"lock",text:e.t("layout.header.tooltipLock"),icon:"ion:lock-closed-outline"},null,8,["text"])):g("",!0),t(o,{key:"logout",text:e.t("layout.header.dropdownItemLoginOut"),icon:"ion:power-outline"},null,8,["text"])]),_:1},8,["onClick"])]),default:m(()=>[a("span",{class:s([[e.prefixCls,`${e.prefixCls}--${e.theme}`],"flex"])},[a("img",{class:s(`${e.prefixCls}__header`),src:e.getUserInfo.avatar},null,10,F),a("span",{class:s(`${e.prefixCls}__info hidden md:block`)},[a("span",{class:s([`${e.prefixCls}__name  `,"truncate"])},A(e.getUserInfo.realName),3)],2)],2)]),_:1},8,["overlayClassName"]),t(c,{onRegister:e.register},null,8,["onRegister"])],64)}var le=x(j,[["render",H]]);export{le as default};
