// ==============================|| OVERRIDES - INPUT LABEL ||============================== //

import { CONTAINED_PRIMARY_BLUE, VALIDATION_ERROR_COLOR } from '../colorConst';

export default function InputLabel(theme) {
  return {
    MuiInputLabel: {
      styleOverrides: {
        root: {
          color: theme.palette.grey[600],
          '&.Mui-focused:not(.Mui-error)': {
            color: CONTAINED_PRIMARY_BLUE
          },
          '&.Mui-error': {
            color: VALIDATION_ERROR_COLOR
          },
          '&.Mui-focused.Mui-error': {
            color: VALIDATION_ERROR_COLOR
          }
        },
        outlined: {
          lineHeight: '0.8em',
          '&.MuiInputLabel-sizeSmall': {
            lineHeight: '1em'
          },
          '&.MuiInputLabel-shrink': {
            background: theme.palette.background.paper,
            padding: '0 8px',
            marginLeft: -6,
            lineHeight: '1.4375em'
          }
        }
      }
    }
  };
}
