"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PasswordRequirements=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _RequirementCheck=require("../components/RequirementCheck");var _reactAuthShared=require("@brightlayer-ui/react-auth-shared");var _jsxFileName="/home/circleci/login-workflow/login-workflow/src/components/PasswordRequirements.tsx";var PasswordRequirements=function PasswordRequirements(props){var passwordText=props.passwordText,style=props.style;var _useLanguageLocale=(0,_reactAuthShared.useLanguageLocale)(),t=_useLanguageLocale.t;var defaultRequirements=[{regex:_reactAuthShared.LENGTH_REGEX,description:t('blui:PASSWORD_REQUIREMENTS.LENGTH')},{regex:_reactAuthShared.NUMBERS_REGEX,description:t('blui:PASSWORD_REQUIREMENTS.NUMBERS')},{regex:_reactAuthShared.UPPER_CASE_REGEX,description:t('blui:PASSWORD_REQUIREMENTS.UPPER')},{regex:_reactAuthShared.LOWER_CASE_REGEX,description:t('blui:PASSWORD_REQUIREMENTS.LOWER')},{regex:_reactAuthShared.SPECIAL_CHAR_REGEX,description:t('blui:PASSWORD_REQUIREMENTS.SPECIAL')}];var _useInjectedUIContext=(0,_reactAuthShared.useInjectedUIContext)(),_useInjectedUIContext2=_useInjectedUIContext.passwordRequirements,passwordRequirements=_useInjectedUIContext2===void 0?defaultRequirements:_useInjectedUIContext2;return _react.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:9}},passwordRequirements.map(function(req,ind){return _react.default.createElement(_RequirementCheck.RequirementCheck,{key:"password_requirement_"+ind,text:req.description,isChecked:new RegExp(req.regex).test(passwordText),__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:17}});}));};exports.PasswordRequirements=PasswordRequirements;
//# sourceMappingURL=PasswordRequirements.js.map