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

export const getRadioColor = (
  theme: Theme,
  checked: boolean,
  disabled: boolean,
  error: boolean,
): string | undefined => {
  if (disabled) {
    return theme.palette.new?.icon.neutral.disabled;
  }
  if (error) {
    return theme.palette.new?.text.feedback.error;
  }
  if (checked) {
    return theme.palette.new?.action.button.background.primary.default;
  }

  return theme.palette.new?.icon.neutral.lighter;
};
