import { useLingui, Trans } from '../../../../../../node_modules/@lingui/react/dist/index.mjs';
import React__default from 'react';
import Button from '../../components/atoms/Button.mjs';
import EmailActionLayout from '../../components/molecules/EmailActionLayout.mjs';
import { EmailProviderLink, emailProviderInfo } from '../../components/molecules/EmailProviderLink.mjs';
import { useGlobalReducer } from '../GlobalContextProvider.mjs';
import { AppScreens } from '../types/AppScreens.mjs';
import { useEmailDomain } from './useEmailDomain.mjs';

const PasswordResetConfirmation = ()=>{
    const { i18n: $__i18n, _: $__ } = useLingui();
    const [state, dispatch] = useGlobalReducer();
    const emailDomain = useEmailDomain();
    const email = state.formState.passwordState.email;
    const reset = ()=>{
        dispatch({
            type: 'set_user_supplied_email',
            email: ''
        });
        dispatch({
            type: 'transition',
            screen: AppScreens.Main
        });
    };
    return /*#__PURE__*/ React__default.createElement(EmailActionLayout, {
        header: $__i18n._({
            id: "password.verification.title",
            message: "Verify your email first."
        }),
        description: /*#__PURE__*/ React__default.createElement(Trans, {
            id: "password.verification.content",
            message: "A login link was sent to you at <bold>{email}</bold>.",
            components: {
                bold: /*#__PURE__*/ React__default.createElement("b", null)
            },
            values: {
                email
            }
        }),
        additionalActions: /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, /*#__PURE__*/ React__default.createElement(EmailProviderLink, {
            emailDomain: emailDomain,
            providerInfo: emailProviderInfo.gmail
        }), /*#__PURE__*/ React__default.createElement(EmailProviderLink, {
            emailDomain: emailDomain,
            providerInfo: emailProviderInfo.outlook
        }), /*#__PURE__*/ React__default.createElement(Button, {
            variant: "ghost",
            onClick: reset
        }, $__i18n._({
            id: "button.retry",
            message: "Try again"
        })))
    });
};

export { PasswordResetConfirmation };
//# sourceMappingURL=PasswordResetConfirmation.mjs.map
