"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8786],{78786:(U,n,e)=>{e.r(n),e.d(n,{VerifyEmailPage:()=>m,default:()=>y});var t=e(96540),l=e(20851),o=e(49785),u=e(17172),c=e(66864),a=e(55852),d=e(17408),E=e(88575),f=e(10354),v=e(67061),i=e(2913),g=e(3169),h=e(35538);const S=()=>{const p=(0,g._2)(),{handleSubmit:L,register:V,formState:{errors:r}}=(0,o.mN)(),[z,A]=(0,t.useState)(!1),B=C=>{(0,u.AI)().post("/api/user/signup",C).then(()=>{A(!0)}).catch(s=>{const P=s.data?.message||s;p.warning(P)})};return z?t.createElement("div",null,t.createElement("p",null,"An email with a verification link has been sent to the email address. You should receive it shortly."),t.createElement(c.mc,{margin:"md"}),t.createElement(a.z9,{variant:"primary",href:(0,i.zj)().appSubUrl+"/signup"},"Complete Signup")):t.createElement("form",{onSubmit:L(B)},t.createElement(d.s,null,"Verify Email"),t.createElement(E.D,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!r.email,error:r.email?.message},t.createElement(f.p,{id:"email",...V("email",{required:"Email is required",pattern:{value:h.pL,message:"Email is invalid"}}),placeholder:"Email"})),t.createElement(v.B,null,t.createElement(a.$n,{type:"submit"},"Send verification email"),t.createElement(a.z9,{fill:"text",href:(0,i.zj)().appSubUrl+"/login"},"Back to login")))},m=()=>t.createElement(l.GU,null,t.createElement(l.qm,null,t.createElement(S,null))),y=m}}]);

//# sourceMappingURL=8786.1b0e43b80c82c73e2096.js.map