var f=(e,m,s)=>new Promise((c,a)=>{var d=o=>{try{r(s.next(o))}catch(i){a(i)}},t=o=>{try{r(s.throw(o))}catch(i){a(i)}},r=o=>o.done?c(o.value):Promise.resolve(o.value).then(d,t);r((s=s.apply(e,m)).next())});import{q as w,a as y,c as $,b as F,s as L,f as _,aE as u,o as M,j as S,B as g,i as l,n as p,t as k,p as h,D as I,aF as R}from"./index.fe4a8f33.js";import{B as b,a as N}from"./index.2977da73.js";import{B as P,u as D}from"./useForm.91200ff4.js";import{u as U}from"./lock.a9b0ceba.js";import{h as V}from"./header.d801b988.js";import"./useWindowSizeFn.f54b1eaa.js";import"./FullscreenOutlined.637c676d.js";import"./index.6c03f363.js";import"./index.3a3c0d77.js";import"./_baseIteratee.278425b3.js";import"./get.3dc7fc10.js";import"./useSize.698e0459.js";import"./index.0279ef27.js";import"./index.d5115c22.js";import"./Checkbox.e7a76727.js";import"./index.ba54dfdc.js";import"./index.26ce3e68.js";import"./index.a83792d6.js";import"./index.f3c4f1f0.js";import"./index.a19b4fff.js";import"./index.fb5e2d05.js";import"./eagerComputed.6cd9c590.js";import"./transButton.10edb678.js";import"./index.1495ff0a.js";import"./useRefs.eb1da46f.js";import"./_baseEach.d3257b7c.js";import"./download.b0c50d65.js";import"./index.53dafb64.js";import"./dateUtil.745bf349.js";import"./uniqBy.aaa43b12.js";const q=y({name:"LockModal",components:{BasicModal:b,BasicForm:P},setup(){const{t:e}=$(),{prefixCls:m}=F("header-lock-modal"),s=L(),c=U(),a=_(()=>{var n;return(n=s.getUserInfo)==null?void 0:n.username}),[d,{closeModal:t}]=N(),[r,{validateFields:o,resetFields:i}]=D({showActionButtonGroup:!1,schemas:[{field:"password",label:e("layout.header.lockScreenPassword"),colProps:{span:24},component:"InputPassword",required:!0}]});function v(){return f(this,null,function*(){const C=(yield o()).password;t(),c.setLockInfo({isLock:!0,pwd:C}),yield i()})}const B=_(()=>{const{avatar:n}=s.getUserInfo;return n||V});return{t:e,prefixCls:m,getRealName:a,register:d,registerForm:r,handleLock:v,avatar:B}}}),j=["src"];function z(e,m,s,c,a,d){const t=u("BasicForm"),r=u("a-button"),o=u("BasicModal");return M(),S(o,R({footer:null,title:e.t("layout.header.lockScreen")},e.$attrs,{class:e.prefixCls,onRegister:e.register}),{default:g(()=>[l("div",{class:p(`${e.prefixCls}__entry`)},[l("div",{class:p(`${e.prefixCls}__header`)},[l("img",{src:e.avatar,class:p(`${e.prefixCls}__header-img`)},null,10,j),l("p",{class:p(`${e.prefixCls}__header-name`)},k(e.getRealName),3)],2),h(t,{onRegister:e.registerForm},null,8,["onRegister"]),l("div",{class:p(`${e.prefixCls}__footer`)},[h(r,{type:"primary",block:"",class:"mt-2",onClick:e.handleLock},{default:g(()=>[I(k(e.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}var ke=w(q,[["render",z]]);export{ke as default};