import {
  ASPECT_RATIO_1_1_LABEL,
  ASPECT_RATIO_1_1_VALUE,
  ASPECT_RATIO_3_4_LABEL,
  ASPECT_RATIO_3_4_VALUE,
  ASPECT_RATIO_4_3_LABEL,
  ASPECT_RATIO_4_3_VALUE,
  ASPECT_RATIO_9_16_LABEL,
  ASPECT_RATIO_9_16_VALUE,
  ASPECT_RATIO_16_9_LABEL,
  ASPECT_RATIO_16_9_VALUE,
} from '@/modules/@common/constants/aspectRatios';
import {
  EMBED_CODE_TYPE_DFP_GAM_LABEL,
  EMBED_CODE_TYPE_DFP_GAM_VALUE,
  EMBED_CODE_TYPE_DIRECT_LABEL,
  EMBED_CODE_TYPE_DIRECT_VALUE,
} from '@/modules/@common/constants/embedTypes';
import {
  TYPE_INTELLIGENT,
  TYPE_INTELLIGENT_AMP,
  TYPE_INTELLIGENT_AMP_NAME,
  TYPE_INTELLIGENT_NAME,
  TYPE_LIVE,
  TYPE_LIVE_NAME,
  TYPE_MOBILE_SDK,
  TYPE_MOBILE_SDK_NAME,
  TYPE_OUTSTREAM,
  TYPE_OUTSTREAM_NAME,
  TYPE_STORIES,
  TYPE_STORIES_AMP,
  TYPE_STORIES_AMP_NAME,
  TYPE_STORIES_NAME,
  TYPE_VERTICAL,
  TYPE_VERTICAL_NAME,
  TYPE_WATCH,
  TYPE_WATCH_INLINE,
  TYPE_WATCH_INLINE_NAME,
  TYPE_WATCH_NAME,
} from '@/modules/@common/constants/playerTypes';
import { SORT_DESC } from '@/modules/@common/constants/sort';

export const SEARCH_TEXT_MAX_LENGTH = 100;

export const PLAYER_TYPES = [
  {
    id: TYPE_INTELLIGENT,
    name: TYPE_INTELLIGENT_NAME,
    selfServe: true,
    preview: true,
    embedCodeAspectRatio: true,
    embedCodeAspectRatioDisabled: false,
  },
  {
    id: TYPE_STORIES,
    name: TYPE_STORIES_NAME,
    selfServe: true,
    preview: true,
    embedCodeAspectRatio: true,
    embedCodeAspectRatioDisabled: false,
  },
  {
    id: TYPE_WATCH,
    name: TYPE_WATCH_NAME,
  },
  {
    id: TYPE_INTELLIGENT_AMP,
    name: TYPE_INTELLIGENT_AMP_NAME,
    selfServe: true,
    embedCodeAspectRatio: false,
    embedCodeAspectRatioDisabled: true,
  },
  {
    id: TYPE_STORIES_AMP,
    name: TYPE_STORIES_AMP_NAME,
    selfServe: true,
    embedCodeAspectRatio: false,
    embedCodeAspectRatioDisabled: true,
  },
  {
    id: TYPE_LIVE,
    name: TYPE_LIVE_NAME,
  },
  {
    id: TYPE_MOBILE_SDK,
    name: TYPE_MOBILE_SDK_NAME,
  },
  {
    id: TYPE_OUTSTREAM,
    name: TYPE_OUTSTREAM_NAME,
    selfServe: true,
    preview: false,
    embedCodeAspectRatio: false,
    embedCodeAspectRatioDisabled: true,
    embedCodeTypes: true,
  },
  {
    id: TYPE_WATCH_INLINE,
    name: TYPE_WATCH_INLINE_NAME,
  },
  {
    id: TYPE_VERTICAL,
    name: TYPE_VERTICAL_NAME,
    selfServe: true,
    preview: true,
    embedCodeAspectRatio: true,
    embedCodeAspectRatioDisabled: true,
  },
];

// Status Select
export const ALL_TYPE = {
  id: 0,
  name: 'All Types',
};

// Table header

export const TABLE_HEADER = [
  {
    id: 'id',
    label: 'Id',
    sortable: true,
    width: '68',
  },
  {
    id: 'alias',
    label: 'Name',
    sortable: true,
    width: '200',
  },
  {
    id: 'comments',
    label: 'Description',
    sortable: true,
    width: '200',
  },
  {
    id: 'type',
    label: 'Type ',
    sortable: true,
    width: '100',
  },
  {
    id: 'publisher',
    label: 'Hub',
    sortable: false,
    width: '160',
  },
  {
    id: 'updatedBy',
    label: 'Updated By',
    sortable: true,
    width: '220',
  },
  {
    id: 'updatedAt',
    label: 'Updated Date',
    sortable: true,
    width: '160',
    isDefaultSortBy: true,
    defaultSortOrder: SORT_DESC,
  },
  {
    id: 'rowActions',
    label: '',
    sortable: false,
    autoWidth: true,
    padding: 'none',
  },
];

export const ROWS_PER_PAGE_DEFAULT = 15;
export const ROWS_PER_PAGE_DEFAULT_FILTER = 30;
export const TABLE_REDUX_FIELD_NAME = 'commonTable';

export const EMBED_CODE_TYPES = [
  {
    label: EMBED_CODE_TYPE_DIRECT_LABEL,
    value: EMBED_CODE_TYPE_DIRECT_VALUE,
  },
  {
    label: EMBED_CODE_TYPE_DFP_GAM_LABEL,
    value: EMBED_CODE_TYPE_DFP_GAM_VALUE,
  },
];

export const ASPECT_RATIOS = [
  {
    label: ASPECT_RATIO_16_9_LABEL,
    value: ASPECT_RATIO_16_9_VALUE,
  },
  {
    label: ASPECT_RATIO_9_16_LABEL,
    value: ASPECT_RATIO_9_16_VALUE,
  },
  {
    label: ASPECT_RATIO_4_3_LABEL,
    value: ASPECT_RATIO_4_3_VALUE,
  },
  {
    label: ASPECT_RATIO_3_4_LABEL,
    value: ASPECT_RATIO_3_4_VALUE,
  },
  {
    label: ASPECT_RATIO_1_1_LABEL,
    value: ASPECT_RATIO_1_1_VALUE,
  },
];
