var f=(o,l,r)=>new Promise((c,t)=>{var d=e=>{try{s(r.next(e))}catch(i){t(i)}},a=e=>{try{s(r.throw(e))}catch(i){t(i)}},s=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,a);s((r=r.apply(o,l)).next())});import{j as w,a as y,k as F,b as $,l as L,c as _,O as u,o as M,Q as S,x as g,f as p,n as m,z as k,i as h,y as I,R}from"./index.ae52ebae.js";import{B as N,a as b}from"./index.3ccc18ac.js";import{B as P}from"./BasicForm.d58d202f.js";import{u as U}from"./useForm.e55162bc.js";import{u as V}from"./lock.e396c5c7.js";import{h as z}from"./header.d801b988.js";import"./useWindowSizeFn.d176b3a5.js";import"./FullscreenOutlined.b9fd5be6.js";import"./index.9e0f8a6b.js";/* empty css */import"./index.c1d6a1f9.js";import"./index.0321d0be.js";import"./Checkbox.919eb32a.js";import"./index.beed4ab5.js";import"./index.4040b11d.js";import"./index.a995b471.js";import"./index.14e14872.js";import"./index.52c33256.js";import"./get.0b1c6ac7.js";import"./Form.1cc72784.js";import"./Col.605699c9.js";import"./useFlexGapSupport.3240d255.js";import"./_baseIteratee.432be787.js";import"./useSize.9b10dc05.js";import"./index.0fe57a5b.js";import"./DeleteOutlined.707204c0.js";import"./index.87b4cc3a.js";import"./useRefs.fe3bdf15.js";import"./index.0c29338b.js";import"./onMountedOrActivated.c176aad3.js";import"./index.adbf62a5.js";import"./index.37fc506d.js";import"./index.5c0d538f.js";import"./uniqBy.7b5fdd96.js";import"./index.5d87e81e.js";import"./css.bcd121de.js";import"./index.3eedf359.js";import"./index.3b88ad02.js";import"./useContextMenu.6088df26.js";import"./index.5e5e8ba1.js";const D=y({name:"LockModal",components:{BasicModal:N,BasicForm:P},setup(){const{t:o}=F(),{prefixCls:l}=$("header-lock-modal"),r=L(),c=V(),t=_(()=>{var n;return(n=r.getUserInfo)==null?void 0:n.realName}),[d,{closeModal:a}]=b(),[s,{validateFields:e,resetFields:i}]=U({showActionButtonGroup:!1,schemas:[{field:"password",label:o("layout.header.lockScreenPassword"),component:"InputPassword",required:!0,componentProps:{width:200,placeholder:"\u8BF7\u8F93\u5165\u9501\u5C4F\u5BC6\u7801"},colProps:{span:24}}]});function v(){return f(this,null,function*(){const C=(yield e()).password;a(),c.setLockInfo({isLock:!0,pwd:C}),yield i()})}const B=_(()=>{const{avatar:n}=r.getUserInfo;return n||z});return{t:o,prefixCls:l,getRealName:t,register:d,registerForm:s,handleLock:v,avatar:B}}}),j=["src"];function q(o,l,r,c,t,d){const a=u("BasicForm"),s=u("a-button"),e=u("BasicModal");return M(),S(e,R({footer:null,title:o.t("layout.header.lockScreen")},o.$attrs,{class:o.prefixCls,onRegister:o.register}),{default:g(()=>[p("div",{class:m(`${o.prefixCls}__entry`)},[p("div",{class:m(`${o.prefixCls}__header`)},[p("img",{src:o.avatar,class:m(`${o.prefixCls}__header-img`)},null,10,j),p("p",{class:m(`${o.prefixCls}__header-name`)},k(o.getRealName),3)],2),h(a,{onRegister:o.registerForm},null,8,["onRegister"]),p("div",{class:m(`${o.prefixCls}__footer`)},[h(s,{type:"primary",block:"",class:"mt-2",onClick:o.handleLock},{default:g(()=>[I(k(o.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}var So=w(D,[["render",q]]);export{So as default};