import { TYPE_RSS, TYPE_SITEMAP, TYPE_STORY_API } from '@/modules/feeds/constants';

import { FeedType } from '@/modules/feeds/types';

export const TAB_GENERAL = 'general';
export const TAB_ADVANCED = 'advanced';
export const TAB_SCRIPT = 'script';
export const TAB_MODEL = 'model';

export const REDUX_FIELD_NAME = 'commonForm';

export const ACCESS_LEVEL_HUB = 'SITE';
export const ACCESS_LEVEL_PRIVATE = 'PRIVATE';
export const ACCESS_LEVEL_SYNDICATE = 'PUBLIC';
export const ACCESS_LEVEL_OPTIONS = [
  {
    label: 'Private',
    value: ACCESS_LEVEL_PRIVATE,
  },
  {
    label: 'Hub',
    value: ACCESS_LEVEL_HUB,
  },
  {
    label: 'Syndication',
    value: ACCESS_LEVEL_SYNDICATE,
  },
];
export const ACCESS_LEVEL_ALL_OPTIONS = [
  {
    label: 'Private',
    value: ACCESS_LEVEL_PRIVATE,
  },
  {
    label: 'Hub',
    value: ACCESS_LEVEL_HUB,
  },
  {
    label: 'Syndication',
    value: ACCESS_LEVEL_SYNDICATE,
  },
];

export const ALL_OPTION_ID = 999999999;
export const ALL_HUB_OPTION = { id: ALL_OPTION_ID, name: 'All Hubs' };

export const AUTH_METHOD_NOAUTH = 'NoAuth';
export const AUTH_METHOD_BASIC = 'Basic';
export const AUTH_METHOD_DIGEST = 'Digest';
export const AUTH_METHOD_NTLM = 'Ntlm';
export const AUTH_METHOD_OPTIONS = [
  {
    label: 'No Auth',
    value: AUTH_METHOD_NOAUTH,
  },
  {
    label: 'Basic',
    value: AUTH_METHOD_BASIC,
  },
  {
    label: 'Digest',
    value: AUTH_METHOD_DIGEST,
  },
  {
    label: 'NTLM',
    value: AUTH_METHOD_NTLM,
  },
];

export const SCHEDULE_TYPE_DAILY = 'DAILY';
export const SCHEDULE_TYPE_CUSTOM = 'CUSTOM';
export const SCHEDULE_TYPE_OPTIONS = [
  {
    label: 'Daily',
    value: SCHEDULE_TYPE_DAILY,
  },
  {
    label: 'Custom',
    value: SCHEDULE_TYPE_CUSTOM,
  },
];

export const FILE_SELECTION_NONE = 'NONE';
export const FILE_SELECTION_RESOLUTION = 'RESOLUTION';
export const FILE_SELECTION_BITRATE = 'BIT_RATE';
export const FILE_SELECTION_OPTIONS = [
  {
    label: 'None',
    value: FILE_SELECTION_NONE,
  },
  {
    label: ' Bit Rate',
    value: FILE_SELECTION_BITRATE,
    shouldHideForTypes: [TYPE_RSS, TYPE_SITEMAP, TYPE_STORY_API] as FeedType[],
  },
  {
    label: 'Resolution',
    value: FILE_SELECTION_RESOLUTION,
  },
];

export const RESOLUTION_WIDTH = 'WIDTH';
export const RESOLUTION_HEIGHT = 'HEIGHT';
export const RESOLUTION_OPTIONS = [
  {
    label: 'Width',
    value: RESOLUTION_WIDTH,
    shouldHideForTypes: [TYPE_RSS, TYPE_SITEMAP, TYPE_STORY_API] as FeedType[],
  },
  {
    label: 'Height',
    value: RESOLUTION_HEIGHT,
  },
];

export const VIDEO_FILE_TYPE_MP4 = 'MP4';
export const VIDEO_FILE_TYPE_M3U8 = 'm3u8';
export const VIDEO_FILE_TYPE_MP4M3U8 = 'MP4_m3u8';
export const VIDEO_FILE_TYPE_OPTIONS = [
  {
    label: 'MP4 & m3u8 (HLS)',
    value: VIDEO_FILE_TYPE_MP4M3U8,
  },
  {
    label: 'MP4',
    value: VIDEO_FILE_TYPE_MP4,
  },
  {
    label: 'm3u8 (HLS)',
    value: VIDEO_FILE_TYPE_M3U8,
  },
];

export const ASPECT_RATIO_16_9 = '16_9';
export const ASPECT_RATIO_9_16 = '9_16';
export const ASPECT_RATIO_4_3 = '4_3';
export const ASPECT_RATIO_1_1 = '1_1';
export const ASPECT_RATIO_OPTIONS = [
  {
    label: '16:9',
    value: ASPECT_RATIO_16_9,
  },
  {
    label: '9:16',
    value: ASPECT_RATIO_9_16,
  },
  {
    label: '4:3',
    value: ASPECT_RATIO_4_3,
  },
  {
    label: '1:1',
    value: ASPECT_RATIO_1_1,
  },
];

export const FIT_FILL = 'FILL';
export const FIT_FIT = 'FIT';
export const FIT_STRETCH = 'STRETCH';
export const FIT_OPTIONS = [
  {
    label: 'Fill (lock aspect ratio)',
    value: FIT_FILL,
  },
  {
    label: 'Fit (lock aspect ratio)',
    value: FIT_FIT,
  },
  {
    label: 'Stretch',
    value: FIT_STRETCH,
  },
];

export const SPEECH_TO_TEXT_DISABLED_VALUE = 'Disabled';
export const SPEECH_TO_TEXT_GOOGLE_VALUE = 'Google';
export const SPEECH_TO_TEXT_VERBIT_AUTO_VALUE = 'VERBIT_AUTO';
export const SPEECH_TO_TEXT_VERBIT_MANUAL_VALUE = 'VERBIT_MANUAL';
export const SPEECH_TO_TEXT_VERBIT_MANUAL_24H_VALUE = 'VERBIT_MANUAL_24H';
export const SPEECH_TO_TEXT_ASSEMBLY_AI_VALUE = 'AssemblyAI';
export const SPEECH_TO_TEXT_ANYCLIP_S2T_VALUE = 'ANYCLIP_S2T';

export const SPEECH_TO_TEXT_OPTIONS = [
  {
    label: 'Disabled',
    value: SPEECH_TO_TEXT_DISABLED_VALUE,
  },
  {
    label: 'Google',
    value: SPEECH_TO_TEXT_GOOGLE_VALUE,
  },
  {
    label: 'Verbit - automated transcript',
    value: SPEECH_TO_TEXT_VERBIT_AUTO_VALUE,
  },
  {
    label: 'Verbit - manual transcript (4 hrs)',
    value: SPEECH_TO_TEXT_VERBIT_MANUAL_VALUE,
  },
  {
    label: 'Verbit - manual transcript (24 hrs)',
    value: SPEECH_TO_TEXT_VERBIT_MANUAL_24H_VALUE,
  },
  {
    label: 'AssemblyAI',
    value: SPEECH_TO_TEXT_ASSEMBLY_AI_VALUE,
  },
  {
    label: 'Anyclip Speech2Text',
    value: SPEECH_TO_TEXT_ANYCLIP_S2T_VALUE,
  },
] as const;

export const CONTENT_OWNER_LIVE_EVENT_TYPE = 99;
export const CONTENT_OWNER_STATUS_DISABLED = 0;

export const MEETINGS_SOURCES_ENABLED_BY_DEFAULT = [
  {
    model: 'TEXT_DETECTION',
    provider: 'GOOGLE',
  },
  {
    model: 'ENCODE',
    provider: 'ANYCLIP',
  },
  {
    model: 'VIDEO_PREVIEW',
    provider: 'ANYCLIP',
  },
  {
    model: 'VIDEO_THUMBNAIL',
    provider: 'ANYCLIP',
  },
  {
    model: 'NLP_CLASSIFICATION',
    provider: 'ANYCLIP',
  },
];

export const SOURCES_DISABLED_BY_DEFAULT = [
  { model: 'HIGHLIGHTS', provider: 'ANYCLIP' },
  { model: 'AUTO_CHAPTERS', provider: 'ANYCLIP' },
  { model: 'IAB_CLASSIFICATION', provider: 'ANYCLIP' },
  { model: 'BRAND_SAFETY', provider: 'ANYCLIP' },

  { model: 'ALCOHOL', provider: 'WEAVO' },
  { model: 'FIREARMS', provider: 'WEAVO' },
  { model: 'NUDITY', provider: 'WEAVO' },
  { model: 'WAR_AND_TERROR', provider: 'WEAVO' },

  { model: 'MULTI_LANGUAGE_SUBTITLES', provider: 'GOOGLE' },
  { model: 'SAFE_SEARCH_DETECTION', provider: 'GOOGLE' },
  { model: 'LOGO_DETECTION', provider: 'GOOGLE' },
  { model: 'LABEL_DETECTION', provider: 'GOOGLE' },
  { model: 'TEXT_DETECTION', provider: 'GOOGLE' },

  { model: 'CELEBRITY', provider: 'CLARIFAI' },
  { model: 'LOGO', provider: 'CLARIFAI' },
  { model: 'GENERAL', provider: 'CLARIFAI' },
  { model: 'MODERATION', provider: 'CLARIFAI' },

  { model: 'CHAT_GPT_DESCRIPTION', provider: 'OPENAI' },
  { model: 'TOPICS', provider: 'OPENAI' },

  { model: 'CUSTOM_PEOPLE', provider: 'AMAZON' },
  { model: 'MODERATION_LABELS', provider: 'AMAZON' },
  { model: 'CELEBRITIES', provider: 'AMAZON' },
];

export const ACCOUNT_TYPE_SYNDICATION = 'SYNDICATION';

export const YT_CONTENT_TYPE_CHANNEL = 'CHANNEL';
export const YT_CONTENT_TYPE_PLAYLIST = 'PLAYLIST';
export const YT_CONTENT_TYPE_OPTIONS = [
  {
    label: 'Channel',
    value: YT_CONTENT_TYPE_CHANNEL,
  },
  {
    label: 'Playlist',
    value: YT_CONTENT_TYPE_PLAYLIST,
  },
];

export const CONTENT_TYPE_ALL = 'ALL';
export const CONTENT_TYPE_SHORTS = 'SHORTS';
export const CONTENT_TYPE_VIDEO = 'VIDEO';
export const CONTENT_TYPE_OPTIONS = [
  {
    label: 'All',
    value: CONTENT_TYPE_ALL,
  },
  {
    label: 'Shorts',
    value: CONTENT_TYPE_SHORTS,
  },
  {
    label: 'Video',
    value: CONTENT_TYPE_VIDEO,
  },
];
