import {
  PRIMARY_LEFT_Y_AXIS_ID,
  PRIMARY_RIGHT_Y_AXIS_ID,
  SECOND_LEFT_Y_AXIS_ID,
} from '@/modules/marketplace/common/constants';

export const TOTALS = [
  {
    header: 'Player Loads',
    key: 'PLAYER_LOADS',
  },
  {
    header: 'Ad Requests',
    key: 'SUPPLY_REQUESTS',
  },
  {
    header: 'Ad Impressions',
    key: 'IMPRESSIONS',
  },
  {
    header: 'Request Fill',
    key: 'SUPPLY_REQUESTS_FILL',
    postfix: '%',
    needMultiply: true,
  },
  {
    header: 'Revenue',
    key: 'REVENUE',
    prefix: '$',
    tooltip: 'Revenue + Expenses',
  },
  {
    header: 'Gross Revenue',
    key: 'GROSS_REVENUE',
    prefix: '$',
  },
  {
    header: 'Media Margin',
    key: 'MEDIA_MARGIN',
    prefix: '$',
    tooltip: 'Revenue - Cost',
  },
  {
    header: 'Media Margin %',
    key: 'MEDIA_MARGIN_PERCENT',
    postfix: '%',
    needMultiply: true,
    tooltip: 'Media Margin / Revenue',
  },
  {
    header: 'Gross Ad RPM',
    key: 'GROSS_RPM',
    prefix: '$',
    tooltip: 'Gross Revenue/Ad impressions',
  },
  {
    header: 'Ad RPM',
    key: 'PUB_AD_RPM',
    prefix: '$',
    tooltip: 'Revenue/Ad impressions',
  },
  {
    header: 'Gross Player eRPM',
    key: 'GROSS_PLAYER_ERPM',
    prefix: '$',
    tooltip: 'Gross Revenue/Player Loads',
  },
  {
    header: 'AC Ad RPM',
    key: 'AC_AD_RPM',
    prefix: '$',
    tooltip: 'Revenue generated from AC demand/Ad impressions generated from AC demand',
  },
];

export const PERFORMANCE_COMPARISON_PARAMS = [
  {
    label: 'Today',
    value: 'today',
    type: 'area',
    yAxisId: PRIMARY_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-14)',
  },
  {
    label: 'Yesterday',
    value: 'yesterday',
    type: 'line',
    yAxisId: PRIMARY_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-15)',
  },
  {
    label: '7 Days Ago',
    value: 'week',
    type: 'line',
    yAxisId: PRIMARY_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-16)',
  },
];

export const PERFORMANCE_COMPARISON_FILTERS = [
  {
    label: 'Player Loads',
    value: 'PLAYER_LOADS',
  },
  {
    label: 'Ad Requests',
    value: 'SUPPLY_REQUESTS',
  },
  {
    label: 'Ad Impressions',
    value: 'IMPRESSIONS',
  },
  {
    label: 'Revenue',
    value: 'REVENUE',
  },
  {
    label: 'Gross Revenue',
    value: 'GROSS_REVENUE',
  },
  {
    label: 'Overall Fill',
    value: 'OVERALL_FILL',
  },
  {
    label: 'AC Ad RPM',
    value: 'AC_AD_RPM',
  },
  {
    label: 'Gross Ad RPM',
    value: 'GROSS_RPM',
  },
  {
    label: 'Ad RPM',
    value: 'PUB_AD_RPM',
  },
  {
    label: 'Gross Player eRPM',
    value: 'GROSS_PLAYER_ERPM',
  },
  {
    label: 'Player eRPM',
    value: 'PUB_PLAYER_ERPM',
  },
  {
    label: 'Player eRPM',
    value: 'PLAYER_ERPM',
  },
];

export const PERFORMANCE_PARAMS = [
  {
    label: 'Request Fill',
    value: 'SUPPLY_REQUESTS_FILL',
    type: 'line',
    yAxisId: PRIMARY_RIGHT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-15)',
  },
  {
    label: 'Ad Requests',
    value: 'SUPPLY_REQUESTS',
    type: 'bar',
    yAxisId: PRIMARY_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-13)',
  },
  {
    label: 'Ad Impressions',
    value: 'IMPRESSIONS',
    type: 'bar',
    yAxisId: SECOND_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-14)',
  },
];

export const FINANCIALS_PARAMS = [
  {
    label: 'Media Margin %',
    value: 'MEDIA_MARGIN_PERCENT',
    type: 'line',
    yAxisId: PRIMARY_RIGHT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-15)',
  },
  {
    label: 'Revenue',
    value: 'REVENUE',
    type: 'bar',
    yAxisId: PRIMARY_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-13)',
  },
  {
    label: 'Gross Revenue',
    value: 'GROSS_REVENUE',
    type: 'bar',
    yAxisId: PRIMARY_LEFT_Y_AXIS_ID,
    color: 'var(--theme-palette--graph-14)',
  },
];

export const GEO_FILTERS = [
  {
    label: 'All Countries',
    value: null,
  },
  {
    label: 'US Only',
    value: 'US',
  },
  {
    label: 'Non-US',
    value: 'NON_US',
  },
];

export const DEVICE_FILTERS = [
  {
    label: 'All Devices',
    value: null,
  },
  {
    label: 'Desktop',
    value: 'DESKTOP',
  },
  {
    label: 'Mobile',
    value: 'MOBILE',
  },
];
