// material-ui
import { useTheme } from '@mui/material/styles';
import { Divider, InputAdornment, InputLabel, OutlinedInput } from '@mui/material';
import MUIFormControl from '@mui/material/FormControl';
import { GenericCardProps } from 'types';
// ==============================|| FORM CONTROL ||============================== //
export interface FormControlProps {
captionLabel?: string;
currencies?: { value: string; label: string }[];
formState?: string;
iconPrimary?: GenericCardProps['iconPrimary'];
iconSecondary?: GenericCardProps['iconPrimary'];
placeholder?: string;
selected?: string;
textPrimary?: string;
textSecondary?: string;
}
const FormControl = ({
captionLabel,
formState,
iconPrimary,
iconSecondary,
placeholder,
textPrimary,
textSecondary
}: FormControlProps) => {
const theme = useTheme();
const IconPrimary = iconPrimary!;
const primaryIcon = iconPrimary ? : null;
const IconSecondary = iconSecondary!;
const secondaryIcon = iconSecondary ? : null;
const errorState = formState === 'error';
return (
{captionLabel}
{primaryIcon && {primaryIcon}}
{textPrimary && (
<>
{textPrimary}
>
)}
>
}
endAdornment={
<>
{secondaryIcon && {secondaryIcon}}
{textSecondary && (
<>
{textSecondary}
>
)}
>
}
/>
);
};
export default FormControl;