import { useLingui, Trans } from '../../../../../../../node_modules/@lingui/react/dist/index.mjs';
import React__default from 'react';
import { readB2CInternals } from '../../../../utils/internal.mjs';
import EmailActionLayout from '../../../components/molecules/EmailActionLayout.mjs';
import { useStytch } from '../../GlobalContextProvider.mjs';
import { useResetResendPasswordActions } from './useResetResendPasswordActions.mjs';
import { EmailSentType } from '../../../../../../core/src/Events.mjs';

const PasswordForgot = ()=>{
    const { i18n: $__i18n, _: $__ } = useLingui();
    const stytchClient = useStytch();
    const { email, resendResetPassword, sendMagicLink, goBack } = useResetResendPasswordActions();
    return /*#__PURE__*/ React__default.createElement(EmailActionLayout, {
        header: $__i18n._({
            id: "password.forgot.title",
            message: "Forgot your password?"
        }),
        description: /*#__PURE__*/ React__default.createElement(Trans, {
            id: "password.forgot.content",
            message: "A link to reset your password was sent to you at <bold>{email}</bold>.",
            components: {
                bold: /*#__PURE__*/ React__default.createElement("b", null)
            },
            values: {
                email
            }
        }),
        resend: ()=>{
            readB2CInternals(stytchClient).networkClient.logEvent({
                name: 'email_try_again_clicked',
                details: {
                    email: email,
                    type: EmailSentType.ResetPassword
                }
            });
            return resendResetPassword();
        },
        sendMagicLink: sendMagicLink,
        goBack: goBack
    });
};

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