import{L as _,a as c,u as b,o as g,j as h,e as x,h as a,bI as q,f as s,w as l,t as V,i as $,O as f,P as w,g as m,Q as p,D as P,G as k,W as Q}from"./index-OSKNspXo.js";import{Q as C}from"./QForm-PGP8CIo6.js";import{_ as D}from"./alertGlobal-C6DL_YAw.js";const S={class:"container"},N={class:"row",style:{display:"flex","flex-direction":"column","align-items":"center"}},B={class:"col-lg-5 col-md-7"},I={class:"text-center q-mb-lg"},z={class:"text-primary",style:{"font-size":"x-large","font-weight":"500"}},E={class:"q-pr-sm q-pl-sm q-pb-sm"},M={class:"q-pr-sm q-pl-sm q-pb-sm"},O={class:"q-pr-sm q-pl-sm"},U={class:"text-center"},L={__name:"initPassword",setup(j){const v=_(),o=c(null),i=c(null),r=c(!0),d=c(!0),{t:u}=b();g(async()=>await v.dispatch("global/getDocumentTitle",u("connection.title")));async function y(){!o.value&&!i.value||(await v.dispatch("global/reinitpassword",{newPassword:o.value,confirmPassword:i.value}),await Q.push({name:"Dashboard"}))}return(n,t)=>(x(),h("div",S,[a("div",N,[a("div",B,[s(k,{class:"q-pa-md"},{default:l(()=>[a("div",I,[a("p",z,V(n.$t("connection.title")),1)]),a("div",E,[s(D)]),s(C,{onSubmit:$(y,["prevent"]),greedy:""},{default:l(()=>[s(f,null,{default:l(()=>[a("div",M,[s(w,{modelValue:o.value,"onUpdate:modelValue":t[1]||(t[1]=e=>o.value=e),type:r.value?"password":"text",label:n.$t("connection.newpassword"),autocomplete:"off",rules:[e=>e!==null||n.$t("initpassword.error.empty.password"),e=>e.length>=8||m(u)("initpassword.error.length")],"lazy-rules":""},{prepend:l(()=>[s(p,{name:"key"})]),append:l(()=>[s(p,{name:r.value?"visibility_off":"visibility",class:"cursor-pointer",onClick:t[0]||(t[0]=e=>r.value=!r.value)},null,8,["name"])]),_:1},8,["modelValue","type","label","rules"])]),a("div",O,[s(w,{modelValue:i.value,"onUpdate:modelValue":t[3]||(t[3]=e=>i.value=e),type:d.value?"password":"text",label:n.$t("connection.newpassword.confirm"),autocomplete:"off","lazy-rules":"",rules:[e=>e!==null||n.$t("initpassword.error.empty.confirm_password"),e=>o.value!=null||e.length>=8||m(u)("initpassword.error.length"),e=>e===o.value||m(u)("initpassword.error.identic")]},{prepend:l(()=>[s(p,{name:"key"})]),append:l(()=>[s(p,{name:d.value?"visibility_off":"visibility",class:"cursor-pointer",onClick:t[2]||(t[2]=e=>d.value=!d.value)},null,8,["name"])]),_:1},8,["modelValue","type","label","rules"])])]),_:1}),s(f,null,{default:l(()=>[a("div",U,[s(P,{type:"submit",label:n.$t("connection.newpassword.validate")},null,8,["label"])])]),_:1})]),_:1})]),_:1})])]),t[4]||(t[4]=q('<footer class="q-py-lg" id="footer-main"><div class="container"><div class="row" style="display:flex;flex-direction:column;align-items:center;"><div class="col-xl-12"><div class="copyright text-center text-xl-center text-white"> © 2018-2023 <a href="https://www.deenova.com/fr" class="deenova_primary font-weight-bold ml-1 text-white" target="_blank">DEENOVA</a></div></div></div></div></footer>',1))]))}};export{L as default};
//# sourceMappingURL=initPassword-B5Jwokpr.js.map
