import React, { useState } from 'react'; import { CButton, CCol, CForm, CFormGroup, CInput, CInputGroup, CInputGroupAppend, CInvalidFeedback, CLabel, CLink, CPopover, CRow, CSelect, CSwitch, } from '@coreui/react'; import PropTypes from 'prop-types'; import CIcon from '@coreui/icons-react'; const CreateUserForm = ({ t, fields, updateField, policies, toggleChange }) => { const [showPassword, setShowPassword] = useState(false); const toggleShowPassword = () => { setShowPassword(!showPassword); }; return ( {t('user.email_address')} {t('user.provide_email')} {t('user.user_role')} {t('user.name')} {t('user.description')} {t('common.optional')} {t('user.password')} {t('user.provide_password')} {t('user.force_password_change')} {t('user.note')} {t('common.optional')} ); }; CreateUserForm.propTypes = { t: PropTypes.func.isRequired, policies: PropTypes.instanceOf(Object).isRequired, fields: PropTypes.instanceOf(Object).isRequired, updateField: PropTypes.func.isRequired, toggleChange: PropTypes.func.isRequired, }; export default React.memo(CreateUserForm);