import { type Theme } from '@mui/material';

export const getLabelColor = (
  theme: Theme,
  disabled: boolean,
  error: boolean,
): string | undefined => {
  if (disabled) {
    return theme.palette.new?.text.neutral.disabled;
  }
  if (error) {
    return theme.palette.new?.text.feedback.error;
  }
  return theme.palette.new?.text.neutral.default;
};

export const getSecondaryTextColor = (
  theme: Theme,
  disabled: boolean,
): string | undefined => {
  if (disabled) {
    return theme.palette.new?.text.neutral.disabled;
  }
  return theme.palette.new?.text.neutral.lighter;
};
