import React from 'react';
import FormControl from '@mui/material/FormControl';
import FormHelperText from '@mui/material/FormHelperText';
import IconButton from '@mui/material/IconButton';
import InputAdornment from '@mui/material/InputAdornment';
import InputLabel from '@mui/material/InputLabel';
import OutlinedInput from '@mui/material/OutlinedInput';
import Visibility from '@mui/icons-material/Visibility';
import VisibilityOff from '@mui/icons-material/VisibilityOff';
import Env from './Env';
export default function Password({
id = 'password',
label = '',
value = '',
disabled = false,
autoComplete = 'current-password',
env = false,
show = false,
helperText = false,
inputProps = {},
error = false,
onChange = function (value) {},
}) {
const [$visible, setVisible] = React.useState(show);
const handleClickShowPassword = () => {
setVisible(!$visible);
};
const handleMouseDownPassword = (event) => {
event.preventDefault();
};
let adornment = (
{env ? : null}
);
if (disabled === false) {
adornment = (
{$visible ? : }
{env ? : null}
);
}
return (
{label}
{helperText && {helperText}}
);
}