"use strict";(globalThis["webpackChunkquasar_project"]=globalThis["webpackChunkquasar_project"]||[]).push([[910],{2929:(t,e,a)=>{a.d(e,{n:()=>s});var o=a(705);const s=(0,o.nY)("auth",{state:()=>({auth:{}}),getters:{getAuthUser:t=>t.auth,isAuthenticated:t=>t.auth?.token?.length>0},actions:{setAuthUser(t){this.auth=t},clearAuthUser(){this.auth={}}}})},3910:(t,e,a)=>{a.r(e),a.d(e,{default:()=>m});var o=a(5584),s=a(5013),l=a(3341),r=a(222),n=a(3417),i=a(3933),c=a(8813),p=a(2677),d=a(272),g=a.n(d);const u=o.A,m=u;g()(o.A,"components",{QPage:s.A,QCard:l.A,QCardSection:r.A,QForm:n.A,QIcon:i.A,QInput:c.A,QBtn:p.A})},5584:(t,e,a)=>{a.d(e,{A:()=>o.A});var o=a(8939)},8939:(t,e,a)=>{a.d(e,{A:()=>k});var o=a(1347),s=a(4187),l=a(8633),r=a(7763),n=a(8302),i=a(3022),c=a(9431),p=a(5583),d=a(455),g=a(2929);const u={class:"col-12 text-left"},m={class:"text-h5 q-mb-md"},h={class:"q-mb-none text-grey"},b={class:"col-12"},f={class:"col-12"},w={class:"col-12"},k=(0,o.pM)({__name:"ForgotPasswordPage",setup(t){const{t:e}=(0,c.s9)();(0,n.A)({title:e("pages.forgotPassword.title"),meta:[{property:"og:type",content:"website"},{property:"og:site_name",content:"Quasar Framework"},{property:"robots",content:"index, follow"},{property:"og:title",content:e("pages.forgotPassword.title")},{property:"og:description",content:e("pages.forgotPassword.title")},{property:"og:image",content:"https://quasar.dev/logo.png"},{property:"og:url",content:"https://quasar.dev/forgot-password"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:e("pages.forgotPassword.title")}]});const a=(0,i.A)(),k=(0,d.rd)(),y=(0,s.KR)({email:""});async function A(){await k.push({name:"login"})}async function v(){await p.api.post("/forgot-password",{...y.value}).then(async t=>{console.log(t),a.notify({type:"positive",message:e("messages.resetLinkSent")}),await k.push({name:"login"})}).finally(()=>{console.log("Forgot password attempt finished")})}return(0,o.sV)(()=>{const t=(0,g.n)();if(t.isAuthenticated)return k.push({name:"dashboard"})}),(t,n)=>{const i=(0,o.g2)("q-icon"),c=(0,o.g2)("q-input"),p=(0,o.g2)("q-btn"),d=(0,o.g2)("q-form"),g=(0,o.g2)("q-card-section"),k=(0,o.g2)("q-card"),q=(0,o.g2)("q-page");return(0,o.uX)(),(0,o.Wv)(q,{class:"flex flex-center"},{default:(0,o.k6)(()=>[(0,o.bF)(k,{class:(0,r.C4)([{"shadow-24":!(0,s.R1)(a).platform.is.mobile,"shadow-10":(0,s.R1)(a).platform.is.mobile},"q-pa-sm"]),bordered:"",style:{width:"380px","max-width":"80%"}},{default:(0,o.k6)(()=>[(0,o.bF)(g,null,{default:(0,o.k6)(()=>[(0,o.bF)(d,{class:"row q-col-gutter-lg",onSubmit:(0,l.D$)(v,["prevent"])},{default:(0,o.k6)(()=>[(0,o.Lk)("div",u,[(0,o.Lk)("h1",m,[(0,o.bF)(i,{name:"lock_reset"}),(0,o.eW)(" "+(0,r.v_)((0,s.R1)(e)("pages.forgotPassword.title")),1)]),(0,o.Lk)("p",h,[(0,o.bF)(i,{name:"arrow_right"}),(0,o.eW)(" "+(0,r.v_)((0,s.R1)(e)("pages.forgotPassword.description")),1)])]),(0,o.Lk)("div",b,[(0,o.bF)(c,{modelValue:y.value.email,"onUpdate:modelValue":n[0]||(n[0]=t=>y.value.email=t),label:(0,s.R1)(e)("labels.email"),filled:"",autofocus:"",name:"email",required:"",autocomplete:"email",type:"email"},{prepend:(0,o.k6)(()=>[(0,o.bF)(i,{name:"email"})]),_:1},8,["modelValue","label"])]),(0,o.Lk)("div",f,[(0,o.bF)(p,{label:(0,s.R1)(e)("actions.sendResetLink"),class:"full-width q-my-md",color:"primary",glossy:"","icon-right":"send",size:"lg",type:"submit"},null,8,["label"])]),(0,o.Lk)("div",w,[(0,o.bF)(p,{label:(0,s.R1)(e)("actions.backToLogin"),class:"full-width",color:"grey",icon:"arrow_back",flat:"",size:"sm",onClick:A},null,8,["label"])])]),_:1})]),_:1})]),_:1},8,["class"])]),_:1})}}})}}]);