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

import { type BaseDatum } from './types';

export const getColorFromType = (type: BaseDatum['type'], theme: Theme) => {
  switch (type) {
    case 'POSITIVE':
      return theme.palette.new.graphics.success[700];
    case 'NEGATIVE':
      return theme.palette.new.graphics.error[600];
    case 'NEUTRAL':
      return theme.palette.new.graphics.warning[400];
    default:
      return '';
  }
};
