"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[384],{384:(e,i,r)=>{r.r(i),r.d(i,{VerifyEmailPage:()=>v,default:()=>j});var a,n,s,l,t=r(76687),d=r(9355),o=r(10967),c=r(70534),u=r(72e3),h=r(94843),m=r(52010);const p=()=>{const e=(0,h.iG)(),[i,r]=(0,t.useState)(!1);return i?(0,m.jsxs)("div",{children:[a||(a=(0,m.jsx)("p",{children:"An email with a verification link has been sent to the email address. You should receive it shortly."})),n||(n=(0,m.jsx)(c.Container,{margin:"md"})),(0,m.jsx)(c.LinkButton,{variant:"primary",href:(0,u.iE)().appSubUrl+"/signup",children:"Complete Signup"})]}):(0,m.jsx)(c.Form,{onSubmit:i=>{(0,o.getBackendSrv)().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,m.jsxs)(m.Fragment,{children:[s||(s=(0,m.jsx)(c.Legend,{children:"Verify Email"})),(0,m.jsx)(c.Field,{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,m.jsx)(c.Input,Object.assign({id:"email"},r("email",{required:"Email is required",pattern:{value:/^\S+@\S+$/,message:"Email is invalid"}}),{placeholder:"Email"}))}),(0,m.jsxs)(c.HorizontalGroup,{children:[l||(l=(0,m.jsx)(c.Button,{type:"submit",children:"Send verification email"})),(0,m.jsx)(c.LinkButton,{fill:"text",href:(0,u.iE)().appSubUrl+"/login",children:"Back to login"})]})]})}})};var g;const v=()=>g||(g=(0,m.jsx)(d.dd,{children:(0,m.jsx)(d.$s,{children:(0,m.jsx)(p,{})})})),j=v}}]);
//# sourceMappingURL=384.5d1b3203e889af7d97b3.js.map