text: import{c as e,f as s,e as r}from"./index.06582e88.js";import{B as a,b as o}from"./index.4d1e0212.js";import{g as t,h as i}from"./useForm.bdacaf58.js";import{u as n}from"./lock.28f145c1.js";import{h as l}from"./header.d801b988.js";import{y as d,j as c,Z as m,B as p,F as f,a1 as u,v as x,J as h,a8 as j,a0 as v}from"./vendor.3dc066e5.js";import"./useWindowSizeFn.308e6090.js";/* empty css              *//* empty css              *//* empty css              *//* empty css              *//* empty css              *//* empty css              */import"./index.4726e763.js";/* empty css              */import"./download.02309083.js";import"./index.76adba59.js";var g=d({name:"LockModal",components:{BasicModal:a,BasicForm:t},setup(){const{t:a}=r(),{prefixCls:t}=e("header-lock-modal"),d=s(),m=n(),p=c((()=>{var e;return null==(e=d.getUserInfo)?void 0:e.realName})),[f,{closeModal:u}]=o(),[x,{validateFields:h,resetFields:j}]=i({showActionButtonGroup:!1,schemas:[{field:"password",label:a("layout.header.lockScreenPassword"),component:"InputPassword",required:!0}]});return{t:a,prefixCls:t,getRealName:p,register:f,registerForm:x,handleLock:function(){return e=this,s=null,r=function*(){const e=(yield h()).password;u(),m.setLockInfo({isLock:!0,pwd:e}),yield j()},new Promise(((a,o)=>{var t=e=>{try{n(r.next(e))}catch(s){o(s)}},i=e=>{try{n(r.throw(e))}catch(s){o(s)}},n=e=>e.done?a(e.value):Promise.resolve(e.value).then(t,i);n((r=r.apply(e,s)).next())}));var e,s,r},avatar:c((()=>{const{avatar:e}=d.getUserInfo;return e||l}))}}});g.render=function(e,s,r,a,o,t){const i=m("BasicForm"),n=m("a-button"),l=m("BasicModal");return p(),f(l,v({footer:null,title:e.t("layout.header.lockScreen")},e.$attrs,{class:e.prefixCls,onRegister:e.register}),{default:u((()=>[x("div",{class:`${e.prefixCls}__entry`},[x("div",{class:`${e.prefixCls}__header`},[x("img",{src:e.avatar,class:`${e.prefixCls}__header-img`},null,10,["src"]),x("p",{class:`${e.prefixCls}__header-name`},h(e.getRealName),3)],2),x(i,{onRegister:e.registerForm},null,8,["onRegister"]),x("div",{class:`${e.prefixCls}__footer`},[x(n,{type:"primary",block:"",class:"mt-2",onClick:e.handleLock},{default:u((()=>[j(h(e.t("layout.header.lockScreenBtn")),1)])),_:1},8,["onClick"])],2)],2)])),_:1},16,["title","class","onRegister"])};export default g;
  