var f=(o,l,r)=>new Promise((c,s)=>{var d=e=>{try{t(r.next(e))}catch(i){s(i)}},a=e=>{try{t(r.throw(e))}catch(i){s(i)}},t=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,a);t((r=r.apply(o,l)).next())});import{av as y,a as w,c as $,b as F,r as L,f as _,a_ as u,o as M,j as S,y as g,m as p,q as m,t as k,n as h,z as I,b0 as b}from"./index.386d9fb7.js";import{B as N,a as R}from"./index.02535309.js";import{B as P}from"./BasicForm.a06b71db.js";import{u as U}from"./useForm.67940d69.js";import{u as V}from"./lock.c03bf47d.js";import{h as q}from"./header.b3b1e10f.js";import"./useWindowSizeFn.b46c26df.js";import"./FullscreenOutlined.9b13e7c7.js";/* empty css *//* empty css */import"./index.aed3fcbc.js";import"./index.d1a867f8.js";import"./Checkbox.ac2c3bae.js";import"./index.099bcd75.js";import"./index.772bb79c.js";import"./Group.e744a08a.js";import"./index.02f194d7.js";import"./eagerComputed.49b57638.js";import"./FileOutlined.4755ce7d.js";import"./index.74294103.js";import"./Form.91d201f3.js";import"./Col.7f949b31.js";import"./useFlexGapSupport.587c05ca.js";import"./_baseIteratee.3f358b05.js";import"./get.b8c3006a.js";import"./useSize.1400bc25.js";import"./useRefs.4d8307d4.js";import"./index.02a610c8.js";import"./index.dc654e6b.js";import"./index.d77b16ba.js";import"./DeleteOutlined.852ea9a3.js";import"./index.aa276cac.js";import"./index.d184e3ed.js";import"./index.2e642baa.js";import"./download.65105715.js";import"./base64Conver.08b9f4ec.js";import"./index.bb9930d5.js";import"./index.2741d802.js";import"./transButton.819dbf15.js";import"./index.28a5cbb8.js";import"./index.2adf5889.js";import"./uniqBy.3999e323.js";const z=w({name:"LockModal",components:{BasicModal:N,BasicForm:P},setup(){const{t:o}=$(),{prefixCls:l}=F("header-lock-modal"),r=L(),c=V(),s=_(()=>{var n;return(n=r.getUserInfo)==null?void 0:n.realName}),[d,{closeModal:a}]=R(),[t,{validateFields:e,resetFields:i}]=U({showActionButtonGroup:!1,schemas:[{field:"password",label:o("layout.header.lockScreenPassword"),colProps:{span:24},component:"InputPassword",required:!0}]});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||q});return{t:o,prefixCls:l,getRealName:s,register:d,registerForm:t,handleLock:v,avatar:B}}}),D=["src"];function j(o,l,r,c,s,d){const a=u("BasicForm"),t=u("a-button"),e=u("BasicModal");return M(),S(e,b({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,D),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(t,{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 bo=y(z,[["render",j]]);export{bo as default};