"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[133],{84666:(R,s,t)=>{t.r(s),t.d(s,{SendResetMailPage:()=>m,default:()=>P});var e=t(65237),o=t(15568),c=t(60234),u=t(55041),g=t(93048),i=t(6741),n=t(48389),E=t(46181),f=t(34128),y=t(5263),v=t(96682),h=t(18819);const S=a=>c.css`
  color: ${a.colors.text.secondary};
  font-size: ${a.typography.bodySmall.fontSize};
  font-weight: ${a.typography.fontWeightRegular};
  margin-top: ${a.spacing(1)};
  display: block;
`,p=()=>{const[a,$]=(0,e.useState)(!1),F=(0,g.wW)(S),d=`${h.ZP.appSubUrl}/login`,L=async l=>{await(0,u.i)().post("/api/user/password/send-reset-email",l)&&$(!0)};return a?e.createElement("div",null,e.createElement("p",null,"An email with a reset link has been sent to the email address. You should receive it shortly."),e.createElement(i.W2,{margin:"md"}),e.createElement(n.Qj,{variant:"primary",href:d},"Back to login")):e.createElement(E.l,{onSubmit:L},({register:l,errors:r})=>e.createElement(e.Fragment,null,e.createElement(f.D,null,"Reset password"),e.createElement(y.g,{label:"User",description:"Enter your information to get a reset link sent to you",invalid:!!r.userOrEmail,error:r?.userOrEmail?.message},e.createElement(v.I,{id:"user-input",placeholder:"Email or username",...l("userOrEmail",{required:"Email or username is required"})})),e.createElement(i.Lh,null,e.createElement(n.zx,{type:"submit"},"Send reset email"),e.createElement(n.Qj,{fill:"text",href:d},"Back to login")),e.createElement("p",{className:F},"Did you forget your username or email? Contact your Grafana administrator.")))},m=()=>e.createElement(o.dd,null,e.createElement(o.$s,null,e.createElement(p,null))),P=m}}]);

//# sourceMappingURL=SendResetMailPage.c263ba792849b8e0fff8.js.map