export const THEME_COLORS = new Set([
  'primary',
  'accent',
  'disabled',
  'red',
  'pink',
  'purple',
  'deep-purple',
  'indigo',
  'blue',
  'light-blue',
  'cyan',
  'teal',
  'green',
  'light-green',
  'lime',
  'yellow',
  'amber',
  'orange',
  'deep-orange',
  'brown',
  'light-grey',
  'grey',
  'dark-grey',
  'blue-grey',
  'black',
  'white',
]);

export function computeCssColor(color: string): string {
  if (THEME_COLORS.has(color)) {
    return `var(--${color}-color)`;
  }
  return color;
}

export function computeRgbColor(color: string): string {
  if (color === 'primary' || color === 'accent') {
    return `var(--rgb-${color}-color)`;
  }
  if (THEME_COLORS.has(color)) {
    return `var(--rgb-${color}-color)`;
  }
  return color;
}
