(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{"5zIn":function(e,i,t){"use strict";t.r(i);var n,r,a,c,s=t("q1tI"),l=t("NoLC"),o=t("kDLi"),d=t("ZFWI"),j=t("t8hP"),u=t("Xmxp"),b=t("Obii"),p=t("nKUr");function h(){return(h=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}const m=()=>{const[e,i]=Object(s.useState)(!1);return e?Object(p.jsxs)("div",{children:[n||(n=Object(p.jsx)("p",{children:"An email with a verification link has been sent to the email address. You should receive it shortly."})),r||(r=Object(p.jsx)(o.Container,{margin:"md"})),Object(p.jsx)(o.LinkButton,{variant:"primary",href:Object(d.c)().appSubUrl+"/signup",children:"Complete Signup"})]}):Object(p.jsx)(o.Form,{onSubmit:e=>{Object(j.getBackendSrv)().post("/api/user/signup",e).then(()=>{i(!0)}).catch(e=>{var i;const t=(null===(i=e.data)||void 0===i?void 0:i.message)||e;u.b.emit(b.AppEvents.alertWarning,[t])})},children:({register:e,errors:i})=>{var t;return Object(p.jsxs)(p.Fragment,{children:[a||(a=Object(p.jsx)(o.Legend,{children:"Verify Email"})),Object(p.jsx)(o.Field,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!i.email,error:null===(t=i.email)||void 0===t?void 0:t.message,children:Object(p.jsx)(o.Input,h({id:"email"},e("email",{required:"Email is required",pattern:{value:/^\S+@\S+$/,message:"Email is invalid"}}),{placeholder:"Email"}))}),Object(p.jsxs)(o.HorizontalGroup,{children:[c||(c=Object(p.jsx)(o.Button,{children:"Send verification email"})),Object(p.jsx)(o.LinkButton,{fill:"text",href:Object(d.c)().appSubUrl+"/login",children:"Back to login"})]})]})}})};var O;t.d(i,"VerifyEmailPage",(function(){return v}));const v=()=>O||(O=Object(p.jsx)(l.b,{children:Object(p.jsx)(l.a,{children:Object(p.jsx)(m,{})})}));i.default=v}}]);
//# sourceMappingURL=100.d7cfb4e56c8be9229275.js.map