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

import { ShadesColor } from '@/mui/types';

import { ALPHA_300, ALPHA_500, ALPHA_700 } from '../../opacity';
import { ACTIONS_OPACITY } from '../index';

// export const TAG_PEOPLE = '#1A8236';
// export const TAG_BRANDS = '#1C5F99';
// export const TAG_IAB = '#8E2CA7';
// export const TAG_BRAND_SAFETY = '#B63104';
// export const TAG_KEYWORDS = '#155766';
// export const TAG_TEXT = '#785020';
// export const TAG_CC = '#5B2CC4';

const SHADES: ShadesColor = {
  0: '#ffffff',
  50: '#ffffff',
  100: '#f9fafb',
  200: '#f4f6f8',
  300: '#dfe3e8',
  400: '#c4cdd5',
  500: '#919eab',
  600: '#637381',
  700: '#454f5b',
  800: '#212b36',
  900: '#161c24',
  A100: '#ffffff',
  A200: '#ffffff',
  A400: '#ffffff',
  A700: '#ffffff',
};

const palette = {
  mode: 'light' as PaletteMode,
  primary: {
    dark: '#0d31b8',
    main: '#2f56e7',
    light: '#497af7',
    contrastText: '#ffffff',
  },
  secondary: {
    dark: '#6719df',
    main: '#782cec',
    light: '#8744ef',
    contrastText: '#ffffff',
  },
  info: {
    dark: '#7e8ab7',
    main: '#929ec8',
    light: '#acb9da',
    contrastText: '#000000',
  },
  success: {
    dark: '#469036',
    main: '#57af48',
    light: '#66cd54',
    contrastText: '#ffffff',
  },
  warning: {
    dark: '#ff8b04',
    main: '#ffa234',
    light: '#ffb72c',
    contrastText: '#000000',
  },
  highlight: {
    dark: '#ffd500',
    main: '#ffe660',
    light: '#fff0a4',
    contrastText: '#000000',
  },
  highlight2: {
    dark: '#0293ea',
    main: '#00a0ff',
    light: '#32b3ff',
    contrastText: '#ffffff',
  },
  error: {
    dark: '#ca2520',
    main: '#dd3630',
    light: '#eb5050',
    contrastText: '#ffffff',
  },
  complimentary: {
    dark: '#37c7b9',
    main: '#4cddcf',
    light: '#75fbeb',
    contrastText: '#000000',
  },
  text: {
    primary: '#000000',
    secondary: alpha('#000000', ALPHA_700),
    disabled: alpha('#000000', ALPHA_500),
  },
  gradient: ['#a1b6e0'],
  platform: {
    anyclip: '#663d9e',
    youtube: '#ff0000',
    linkedin: '#2867b2',
    facebook: '#1877f2',
    twitter: '#000000',
    whatsapp: '#25d366',
    default: '#6782a4',
  },
  '-tagText': {
    dark: '#ffdaae',
    main: '#ffe6c9',
    light: '#ffedd9',
    contrastText: '#785020',
  },
  '-tagBrandSafety': {
    dark: '#ffccbb',
    main: '#ffdfd3',
    light: '#ffeae2',
    contrastText: '#b63104',
  },
  '-tagBrands': {
    dark: '#ccdaf0',
    main: '#dbe8fb',
    light: '#e7f0ff',
    contrastText: '#1c5f99',
  },
  '-tagIAB': {
    dark: '#f3c5ff',
    main: '#f8dbff',
    light: '#fbe9ff',
    contrastText: '#8e2ca7',
  },
  '-tagPeople': {
    dark: '#bdfdd7',
    main: '#dafde8',
    light: '#e8fff1',
    contrastText: '#1a8236',
  },
  '-tagKeywords': {
    dark: '#abf0ff',
    main: '#c7f5ff',
    light: '#d9f8ff',
    contrastText: '#155766',
  },
  '-tagCC': {
    dark: '#d4c2fe',
    main: '#e2d7ff',
    light: '#ebe3ff',
    contrastText: '#5b2cc4',
  },
  '-graph': [
    '#7439d4', // 0
    '#c05ba4', // 1
    '#20914d', // 2
    '#1a658f', // 3
    '#637595', // 4
    '#71aed2', // 5
    '#8a502a', // 6
    '#e53436', // 7
    '#84eb34', // 8
    '#f0ad54', // 9
    '#9748ff', // 10
    '#fc73ff', // 11
    '#9be757', // 12
    // marketplace graphs
    '#2f56e7', // 13
    '#2bd7cc', // 14
    '#06a0ff', // 15
    '#ff4702', // 16
  ],
  divider: alpha(SHADES[900], ALPHA_300),
  background: {
    paper: '#ffffff',
    default: '#fbfbfb',
  },
  shades: SHADES,
  action: {
    active: SHADES[900],
    hover: alpha(SHADES[900], ACTIONS_OPACITY.hoverOpacity),
    selected: alpha(SHADES[900], ACTIONS_OPACITY.selectedOpacity),
    disabled: alpha(SHADES[900], ACTIONS_OPACITY.disabledOpacity),
    disabledBackground: alpha(SHADES[900], ACTIONS_OPACITY.disabledBackgroundOpacity),
    focus: alpha(SHADES[900], ACTIONS_OPACITY.focusOpacity),
    ...ACTIONS_OPACITY,
  },
};

export default palette;
