"use strict";(self.webpackChunk_mattermost_webapp=self.webpackChunk_mattermost_webapp||[]).push([[6],{96512:(e,t,a)=>{a.d(t,{Z:()=>m});var s=a(45697),i=a.n(s),n=a(67294),r=a(86896),l=a(44012),c=a(73727);const d=e=>{const{formatMessage:t}=(0,r.Z)();return n.createElement("div",{id:"back_button",className:"signup-header"},n.createElement(c.Link,{onClick:e.onClick,to:e.url},n.createElement("span",{id:"back_button_icon",className:"fa fa-1x fa-angle-left",title:t({id:"generic_icons.back",defaultMessage:"Back Icon"})}),n.createElement(l.Z,{id:"web.header.back",defaultMessage:"Back"})))};d.propTypes={url:i().string,onClick:i().func},d.defaultProps={url:"/"};const m=d},33006:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var s=a(97779),i=a(14494),n=a(22742),r=a(33383),l=a(45697),c=a.n(l),d=(a(88674),a(33948),a(41637),a(74916),a(64765),a(67294)),m=a(44012),o=a(96512),u=a(68492),f=a(20608),p=a(82251);function E(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class h extends d.PureComponent{constructor(e){super(e),E(this,"handleResend",(async()=>{const e=new URLSearchParams(this.props.location.search).get("email");if(e){this.setState({resendStatus:"sending"});const{data:t,error:a}=await this.props.actions.sendVerificationEmail(e);t?this.setState({resendStatus:"success"}):a&&this.setState({resendStatus:"failure"})}})),this.state={resendStatus:"none"}}render(){let e="";return"success"===this.state.resendStatus&&(e=d.createElement("div",null,d.createElement("br",null),d.createElement("p",{"data-testid":"emailVerifySentMessage",className:"alert alert-success"},d.createElement(f.Z,null),d.createElement(m.Z,{id:"email_verify.sent",defaultMessage:" Verification email sent."})))),"failure"===this.state.resendStatus&&(e=d.createElement("div",null,d.createElement("br",null),d.createElement("p",{className:"alert alert-danger"},d.createElement(u.Z,{className:"fa fa-times",title:{id:(0,p.t)("generic_icons.fail"),defaultMessage:"Failure Icon"}}),d.createElement(m.Z,{id:"email_verify.failed"})))),d.createElement("div",null,d.createElement(o.Z,null),d.createElement("div",{className:"col-sm-12"},d.createElement("div",{className:"signup-team__container"},d.createElement("h3",{"data-testid":"emailVerifyAlmost"},d.createElement(m.Z,{id:"email_verify.almost",defaultMessage:"{siteName}: You are almost done",values:{siteName:this.props.siteName}})),d.createElement("div",null,d.createElement("p",{"data-testid":"emailVerifyNotVerifiedBody"},d.createElement(m.Z,{id:"email_verify.notVerifiedBody",defaultMessage:"Please verify your email address. Check your inbox for an email."})),d.createElement("button",{"data-testid":"emailVerifyResend",onClick:this.handleResend,className:"btn btn-primary"},d.createElement(m.Z,{id:"email_verify.resend",defaultMessage:"Resend Email"})),e))))}}E(h,"propTypes",{location:c().shape({search:c().string.isRequired}).isRequired,siteName:c().string,actions:c().shape({sendVerificationEmail:c().func.isRequired}).isRequired});const b=(0,i.connect)((e=>{const{SiteName:t}=(0,n.iE)(e);return{siteName:t}}),(e=>({actions:(0,s.bindActionCreators)({sendVerificationEmail:r.zk},e)})))(h)}}]);
//# sourceMappingURL=6.f8a49cb50bcd3dfcb338.js.map