"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3818],{2713:(A,r,t)=>{t.r(r),t.d(r,{SendResetMailPage:()=>o,default:()=>p});var e=t(96540),s=t(20851),d=t(32196),c=t(49785),u=t(17172),g=t(40845),l=t(66864),n=t(55852),f=t(17408),E=t(88575),y=t(10354),v=t(2913);const S=a=>(0,d.css)({color:a.colors.text.secondary,fontSize:a.typography.bodySmall.fontSize,fontWeight:a.typography.fontWeightRegular,marginTop:a.spacing(1),display:"block"}),h=()=>{const[a,P]=(0,e.useState)(!1),R=(0,g.of)(S),i=`${v.Ay.appSubUrl}/login`,{handleSubmit:z,register:C,formState:{errors:m}}=(0,c.mN)(),L=async x=>{await(0,u.AI)().post("/api/user/password/send-reset-email",x)&&P(!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(l.mc,{margin:"md"}),e.createElement(n.z9,{variant:"primary",href:i},"Back to login")):e.createElement("form",{onSubmit:z(L)},e.createElement(f.s,null,"Reset password"),e.createElement(E.D,{label:"User",description:"Enter your information to get a reset link sent to you",invalid:!!m.userOrEmail,error:m?.userOrEmail?.message},e.createElement(y.p,{id:"user-input",placeholder:"Email or username",...C("userOrEmail",{required:"Email or username is required"})})),e.createElement(l.Gy,null,e.createElement(n.$n,{type:"submit"},"Send reset email"),e.createElement(n.z9,{fill:"text",href:i},"Back to login")),e.createElement("p",{className:R},"Did you forget your username or email? Contact your Grafana administrator."))},o=()=>e.createElement(s.GU,null,e.createElement(s.qm,null,e.createElement(h,null))),p=o}}]);

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