"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[133],{40615:(e,r,s)=>{s.r(r),s.d(r,{SendResetMailPage:()=>w,default:()=>E});var i,a,n,t,l=s(76687),o=s(9355),d=s(77813),c=s(5205),u=s(27668),h=s(7053),m=s(55312),p=s(56481),g=s(79002),j=s(45550),x=s(9120),y=s(72e3),f=s(52010);const v=e=>d.css`
  color: ${e.colors.formDescription};
  font-size: ${e.typography.size.sm};
  font-weight: ${e.typography.weight.regular};
  margin-top: ${e.spacing.sm};
  display: block;
`,b=()=>{var e,r;const[s,o]=(0,l.useState)(!1),d=(0,u.yK)(v),b=`${y.ZP.appSubUrl}/login`;return s?(0,f.jsxs)("div",{children:[i||(i=(0,f.jsx)("p",{children:"An email with a reset link has been sent to the email address. You should receive it shortly."})),a||(a=(0,f.jsx)(h.W2,{margin:"md"})),(0,f.jsx)(m.Qj,{variant:"primary",href:b,children:"Back to login"})]}):(0,f.jsx)(p.l,{onSubmit:async e=>{await(0,c.i)().post("/api/user/password/send-reset-email",e)&&o(!0)},children:s=>{var i;let{register:a,errors:l}=s;return(0,f.jsxs)(f.Fragment,{children:[n||(n=(0,f.jsx)(g.D,{children:"Reset password"})),(0,f.jsx)(j.g,{label:"User",description:"Enter your information to get a reset link sent to you",invalid:!!l.userOrEmail,error:null==l||null===(i=l.userOrEmail)||void 0===i?void 0:i.message,children:(0,f.jsx)(x.I,Object.assign({id:"user-input",placeholder:"Email or username"},a("userOrEmail",{required:"Email or username is required"})))}),e||(e=(0,f.jsxs)(h.Lh,{children:[t||(t=(0,f.jsx)(m.zx,{type:"submit",children:"Send reset email"})),(0,f.jsx)(m.Qj,{fill:"text",href:b,children:"Back to login"})]})),r||(r=(0,f.jsx)("p",{className:d,children:"Did you forget your username or email? Contact your Grafana administrator."}))]})}})};var k;const w=()=>k||(k=(0,f.jsx)(o.dd,{children:(0,f.jsx)(o.$s,{children:(0,f.jsx)(b,{})})})),E=w}}]);
//# sourceMappingURL=SendResetMailPage.5dd8b50008f967a98da9.js.map