import{r as d,d as c,o as r,c as i,a as s,H as _,l as u,v,t as f,e as p,w as P,f as N,g as m,F as V,i as h}from"./app-91dba96b.js";import{i as C}from"./index-0653e21c.js";import"./appFunction-1b5b1f43.js";const B={class:"text-center mt-4"},D=s("h1",{class:"h2 p-3"},"Reset Password",-1),E={class:"card"},F={class:"card-body"},H={class:"m-sm-3"},M={class:"mb-3"},R=s("label",{class:"form-label"},[m("Password "),s("span",{class:"text-danger"},"*")],-1),S={key:0,class:"text-danger"},T={class:"mb-3"},U=s("label",{class:"form-label"},[m("Confirm Password "),s("span",{class:"text-danger"},"*")],-1),q={key:0,class:"text-danger"},J=s("div",{class:"mb-2"},[s("span",{class:"text-danger"},"* Password must be at least 8 characters least one uppercase and one lowercase letter and one symbol and one number")],-1),L={class:"d-grid gap-2 mt-3"},O=["disabled"],j=s("div",{class:"text-center mb-3"},[s("a",{href:"login"},"Login Here")],-1),I={__name:"resetPassword",props:{token:{required:!0}},setup(w){const b=w,o=d({}),t=d(!1),a=d({}),g=()=>{t.value=!0,o.value={};const l=JSON.parse(b.token);a.value.token=l.token,a.value.email=l.email,C.post("password/reset",a.value).then(e=>{h.success(e.data.message),window.location.href="/dashboard"}).catch(({response:e})=>{e.status===422?o.value=e.data.errors:h.error(e.data.message)}).finally(()=>t.value=!1)};return(l,e)=>{const k=c("app-logo"),x=c("app-button-loader"),y=c("app-auth-footer");return r(),i(V,null,[s("div",B,[_(k),D]),s("div",E,[s("div",F,[s("div",H,[s("div",M,[R,u(s("input",{class:"form-control form-control-lg email",type:"password","onUpdate:modelValue":e[0]||(e[0]=n=>a.value.password=n),placeholder:"Enter New Password"},null,512),[[v,a.value.password]]),o.value.password?(r(),i("div",S,f(o.value.password[0]),1)):p("",!0)]),s("div",T,[U,u(s("input",{class:"form-control form-control-lg email",type:"password","onUpdate:modelValue":e[1]||(e[1]=n=>a.value.confirm_password=n),placeholder:"Enter Confirm Password"},null,512),[[v,a.value.confirm_password]]),o.value.confirm_password?(r(),i("div",q,f(o.value.confirm_password[0]),1)):p("",!0)]),J,s("div",L,[s("button",{type:"button",class:"btn btn-lg btn-primary",onClick:P(g,["prevent"]),disabled:t.value},[t.value?(r(),N(x,{key:0})):p("",!0),m(" Reset Password ")],8,O)])])])]),j,_(y)],64)}}};export{I as default};
