import React from 'react'
import PropTypes from 'prop-types'
import SuccessTemplate from 'react-uikit/alert/templates/success'

const RegisterSuccess = ({email, isShowing, onDismiss}) => {
    const body = (
        <React.Fragment>
            One tiny thing left!
            <br />
            <br />
            Check your email <span style={{fontWeight: 600}}>{email}</span> for
            the verification link. Use it to login and get started with your
            investment portfolio.
        </React.Fragment>
    )

    // [ ] TODO: Implement resend link
    // [ ] TODO: Implement open Intercom chat on “Can’t find the code”

    return (
        <SuccessTemplate
            body={body}
            header="Check your email"
            iconName="alert-success"
            isShowing={isShowing}
            onDismiss={onDismiss}
        />
    )
}

RegisterSuccess.propTypes = {
    email: PropTypes.string,
    isShowing: PropTypes.bool,
    onDismiss: PropTypes.func,
}

export default RegisterSuccess
