"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7456],{79355:(e,i,r)=>{r.r(i),r.d(i,{VerifyEmailPage:()=>E,default:()=>S});var a,s,l,n,t=r(68404),d=r(85040),c=r(6932),o=r(25049),h=r(40920),u=r(61692),m=r(17518),p=r(84719),g=r(1652),j=r(78837),v=r(58257),x=r(45916);const f=()=>{const e=(0,v.iG)(),[i,r]=(0,t.useState)(!1);return i?(0,x.jsxs)("div",{children:[a||(a=(0,x.jsx)("p",{children:"An email with a verification link has been sent to the email address. You should receive it shortly."})),s||(s=(0,x.jsx)(o.W2,{margin:"md"})),(0,x.jsx)(h.Qj,{variant:"primary",href:(0,j.iE)().appSubUrl+"/signup",children:"Complete Signup"})]}):(0,x.jsx)(u.l,{onSubmit:i=>{(0,c.i)().post("/api/user/signup",i).then((()=>{r(!0)})).catch((i=>{var r;const a=(null===(r=i.data)||void 0===r?void 0:r.message)||i;e.warning(a)}))},children:e=>{var i;let{register:r,errors:a}=e;return(0,x.jsxs)(x.Fragment,{children:[l||(l=(0,x.jsx)(m.D,{children:"Verify Email"})),(0,x.jsx)(p.g,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!a.email,error:null===(i=a.email)||void 0===i?void 0:i.message,children:(0,x.jsx)(g.I,Object.assign({id:"email"},r("email",{required:"Email is required",pattern:{value:/^\S+@\S+$/,message:"Email is invalid"}}),{placeholder:"Email"}))}),(0,x.jsxs)(o.Lh,{children:[n||(n=(0,x.jsx)(h.zx,{type:"submit",children:"Send verification email"})),(0,x.jsx)(h.Qj,{fill:"text",href:(0,j.iE)().appSubUrl+"/login",children:"Back to login"})]})]})}})};var b;const E=()=>b||(b=(0,x.jsx)(d.dd,{children:(0,x.jsx)(d.$s,{children:(0,x.jsx)(f,{})})})),S=E}}]);
//# sourceMappingURL=7456.7d18e3403be56627bde0.js.map