import { useLingui } from '../../../../../../node_modules/@lingui/react/dist/index.mjs';
import classNames from '../../../../../../_virtual/index.mjs';
import React__default from 'react';
import VisuallyHidden from '../atoms/VisuallyHidden.mjs';
import modules_8479f250 from './PasswordStrengthCheck.module.css.mjs';

const PasswordStrengthCheck = ({ score })=>{
    const { i18n: $__i18n, _: $__ } = useLingui();
    let status;
    if (score === 1 || score === 2) {
        status = modules_8479f250.weak;
    } else if (score === 3 || score === 4) {
        status = modules_8479f250.strong;
    }
    return /*#__PURE__*/ React__default.createElement("div", {
        className: classNames(modules_8479f250.container, status)
    }, score != null && score > 0 && /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, new Array(4).fill(undefined).map((_, i)=>/*#__PURE__*/ React__default.createElement("div", {
            key: i,
            className: classNames(modules_8479f250.block, {
                [modules_8479f250.filled]: score > i
            })
        })), /*#__PURE__*/ React__default.createElement(VisuallyHidden, null, $__i18n._({
        id: "password.strength",
        message: "Password strength: {score} out of 4.",
        values: {
            score: score
        }
    }))));
};

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