import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Icon } from '../icon/Icon.component';
import { ErrorPageContainer, Row, Title, Description, DescriptionContent, Link, } from './ErrorPageStyle';
const translations = {
    en: {
        unexpected_error: 'Authenticating...',
        error_desc: 'The authentication is in progress.',
        should_do: 'If this message persist please try refreshing your page.',
        may_also_contact: 'You may also contact ',
        to_report_issue: ' to report this issue.',
    },
    fr: {
        unexpected_error: 'Authentification',
        error_desc: 'Authentification en cours.',
        should_do: "Si ce message persiste, vous pouvez essayer d'actualiser cette page.",
        may_also_contact: 'Vous pouvez également contacter le ',
        to_report_issue: ' pour signaler le problème.',
    },
};
function ErrorPageAuth({ supportLink = undefined, locale = 'en', ...rest }) {
    if (!translations[locale])
        locale = 'en';
    // Ensure the locale formatting is consistent
    locale = locale.toLowerCase();
    return (_jsxs(ErrorPageContainer, { className: "sc-error-pageauth", ...rest, children: [_jsxs(Row, { children: [_jsx(Icon, { name: "Info-circle", size: "2x", color: "textPrimary" }), _jsx(Title, { children: translations[locale].unexpected_error })] }), _jsx(Row, { children: _jsxs(Description, { children: [_jsx(DescriptionContent, { children: translations[locale].error_desc }), _jsx(DescriptionContent, { children: translations[locale].should_do }), supportLink && (_jsxs(DescriptionContent, { children: [translations[locale].may_also_contact, _jsxs(Link, { href: supportLink, children: ["support ", _jsx(Icon, { name: "External-link" })] }), translations[locale].to_report_issue] }))] }) })] }));
}
export { ErrorPageAuth };
