import{aD as f,n as m,aB as k,G as l,a3 as p,f as T,u as g,c3 as S}from"./index-f4658ae7.js";import{useLockStore as d}from"./lock-2fef1378.js";function P(){const{getLockTime:c}=f(),u=d(),t=m(),i=k();let n;function e(){window.clearTimeout(n)}function r(){if(!t.getToken){e();return}const o=i.getProjectConfig.lockTime;if(!o||o<1){e();return}e(),n=setTimeout(()=>{a()},o*60*1e3)}function a(){u.setLockInfo({isLock:!0,pwd:void 0})}l(o=>{t.getToken?r():e(),o(()=>{e()})}),p(()=>{e()});const s=S(r,2e3);return T(()=>g(c)?{onKeyup:s,onMousemove:s}:(e(),{}))}export{P as useLockPage};