import {
  TYPE_INTELLIGENT,
  TYPE_INTELLIGENT_AMP,
  TYPE_LIVE,
  TYPE_MOBILE_SDK,
  TYPE_OUTSTREAM,
  TYPE_STORIES,
  TYPE_STORIES_AMP,
  TYPE_VERTICAL,
  TYPE_WATCH,
  TYPE_WATCH_INLINE,
} from '@/modules/@common/constants/playerTypes';

export const GENERAL_TAB = 'generalTab';
export const LOOK_AND_FEEL_TAB = 'lookAndFeel';
export const FLOATING_TAB = 'floating';
export const CONTENT_FILTERS_TAB = 'contentFilters';
export const PLAYBACK_TAB = 'playback';
export const VIDEO_ADS_TAB = 'videoAds';
export const DISPLAY_ADS_TAB = 'displayAds';
export const CUSTOM_PLACEHOLDER_TAB = 'customPlaceholder';

export const POSITIVE_BOOST_FILTERS_VALUE_DEFAULT = 10 ** 3;
export const NEGATIVE_BOOST_FILTERS_VALUE_DEFAULT = -(10 ** 6);

export const PLAYER_TYPES = [
  {
    id: TYPE_INTELLIGENT,
    templateName: 'IntelligentPlayerTemplate',
  },
  {
    id: TYPE_STORIES,
    templateName: 'StoriesPlayerTemplate',
  },
  {
    id: TYPE_WATCH,
    templateName: null,
  },
  {
    id: TYPE_INTELLIGENT_AMP,
    templateName: 'IntelligentAMPPlayerTemplate',
  },
  {
    id: TYPE_STORIES_AMP,
    templateName: 'StoriesAMPPlayerTemplate',
  },
  {
    id: TYPE_LIVE,
    templateName: null,
  },
  {
    id: TYPE_MOBILE_SDK,
    templateName: null,
  },
  {
    id: TYPE_OUTSTREAM,
    templateName: 'OutstreamPlayerTemplate',
  },
  {
    id: TYPE_WATCH_INLINE,
    templateName: null,
  },
  {
    id: TYPE_VERTICAL,
    templateName: 'VerticalPlayerTemplate',
  },
];

export const PLAYER_LOGO_MAX_FILE_SIZE = 'The file size exceeds the maximum allowed limit';
export const PLAYER_LOGO_DIMENSIONS = 'The image dimensions exceed the maximum allowed size';
export const PLAYER_LOGO_INVALID_FILE_TYPE = 'The file type is not supported';

export const UNSUPPORTED_PLAYER_TYPE = 'Unsupported player type';

export const INACTIVATED_PLAYER = 'The player was removed';

export const FLOATING_DISABLED = 0;
export const FLOATING_STANDARD = 1;
export const FLOATING_AMP_STICKY_AD_BAR = 5;

export const WIDTH_MIN = 80;
export const WIDTH_MAX = 7680; // value from MAX_INT_DB
export const FLOATING_WIDTH_MIN = 80;
export const FLOATING_WIDTH_MAX = 7680; // value from MAX_INT_DB;

export const FLOATING_MODE_DISABLED = 'DISABLED';

export const FLOATING_MODE_DISABLED_LABEL = 'Disabled';

export const FLOATING_MODE_ONLY_FOR_CONFIG = 'only';

export const DELAY_CLOSE_ICON_ENABLE_DEFAULT = 1;

export const FLOATING_PAGE_WIDTH_MODE = 4;
export const FLOATING_PAGE_WIDTH_WITH_PILLARBOXING = 6;

export const FLOATING_AMP_STICKY_BAR_MODE = 5;

export const PLAYER_WIDTH_UNITS_PERCENT = '%';
export const PLAYER_WIDTH_UNITS_PIXEL = 'PX';

export const PLAYBACK_MODE_SCROLL_TO_PLAY = 2;
export const PLAYBACK_MODE_CLICK_TO_PLAY = 3;

export const VIDEO_MONETIZATION_ENABLED = 1;
export const VIDEO_MONETIZATION_DISABLED = 6;

export const CAROUSEL_ORIENTATION_HORIZONTAL = 'horizontal';
export const CAROUSEL_ORIENTATION_VERTICAL = 'vertical';
export const CAROUSEL_ORIENTATION_VERTICAL_TITLES = 'vertical-titles';

export const DISABLED_FLOW_TERM_OPTION_ID = 0;
export const DISABLED_FLOW_TERM_OPTION = {
  id: DISABLED_FLOW_TERM_OPTION_ID, // API WAIT FOR NULL
  term: 'Disable',
  termUi: 'Disable',
  termUiSelfServe: 'Disable',
  ApiValue: null,
};

export const EDITORIAL_TYPE_ONLY = 'EDITORIAL_ONLY';
export const EDITORIAL_TYPE_DEFAULT = 'EDITORIAL_AND_LUMINOUS';

export const PLAYER_PREVIEW_WIDTH_DESKTOP = 800;
export const PLAYER_PREVIEW_WIDTH_MOBILE = 500;

export const SKIP_AD_APPEARS_AFTER_MS_MIN = 1;
export const SKIP_AD_APPEARS_AFTER_MS_MAX = 60000;

export const ALL_FEEDS_ID = -1;
export const ALL_FEEDS_NAME = 'All';

export const ALL_LANGUAGES_VALUE = -1;
export const ALL_LANGUAGES_NAME = 'All';

export const PLAYLIST_LIMIT_MIN = 1;
export const PLAYLIST_LIMIT_MAX = 200;

export const INTERVAL_MIN = 0;
export const INTERVAL_MAX = 999999;

export const NAME_MIN_LENGTH = 2;
export const NAME_MAX_LENGTH = 45;

export const AD_SERVER_ENABLED_VALUES = [1, 4, 5];

export const PLAYER_REDUX_FIELD_NAME = 'commonForm';

export const DELAY_MIN_VALUE = 0;
export const DELAY_MAX_VALUE = 999;

export const VERTICAL_FULLSCREEN_TITLE_TIMELINE_VISIBILITY_ALWAYS = 'ALWAYS';
export const VERTICAL_FULLSCREEN_TITLE_TIMELINE_VISIBILITY_ON_TAP = 'ON-TAP';

export const SWIPE_ANIMATION_MAX_VISITS = 3;
export const SWIPE_ANIMATION_DURATION = 5;

export const VERTICAL_FULLSCREEN_TITLE_TIMELINE_OPTIONS = [
  {
    label: 'Always Visible',
    value: VERTICAL_FULLSCREEN_TITLE_TIMELINE_VISIBILITY_ALWAYS,
  },
  {
    label: 'Visible on Tap',
    value: VERTICAL_FULLSCREEN_TITLE_TIMELINE_VISIBILITY_ON_TAP,
  },
];
export const ASPECT_RATIO = {
  RATIO_16_9: '16_9',
  RATIO_4_3: '4_3',
  RATIO_1_1: '1_1',
  RATIO_9_16: '9_16',
  DYNAMIC: 'dynamic',
};
export const HUB_ADMIN_ROLE = 'hub_admin';
