import{h as a,b as f,e as p,u as k}from"./vue-vendor-CxLCUzY4.js";import{B as l,ab as T,z as g,q as S}from"./index-B_2CoVdl.js";import{u as d}from"./lock-BLpRs_CF.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";function v(){const{getLockTime:u}=l(),c=d(),t=T(),i=g();let r;function e(){window.clearTimeout(r)}function n(){if(!t.getToken){e();return}const o=i.getProjectConfig.lockTime;if(!o||o<1){e();return}e(),r=setTimeout(()=>{m()},o*60*1e3)}function m(){c.setLockInfo({isLock:!0,pwd:void 0})}a(o=>{t.getToken?n():e(),o(()=>{e()})}),f(()=>{e()});const s=S(n,2e3);return p(()=>k(u)?{onKeyup:s,onMousemove:s}:(e(),{}))}export{v as useLockPage};
