/* globals Twitch */

export const BASE_URL = "https://twitch.amazon.com/prime";

//Try Prime
export const FRONT_PAGE_HEADER_URL = `${ BASE_URL }?ref_=sm_w_thp_tn_t_all`;
export const FRONT_PAGE_URL = `${ BASE_URL }?ref_=sm_w_thp_a_t_all`;
export const AD_FREE_URL = `${ BASE_URL }?ref_=sm_w_tup_p_t_af`;
export const AD_FREE_LINK_URL = `${ BASE_URL }?ref_=sm_w_tup_p_t_af`;
export const SUB_BUTTON_URL = `${ BASE_URL }?ref_=sm_w_tcp_m_t_sub`;
export const SUB_BUTTON_LINK_URL = `${ BASE_URL }?ref_=sm_w_tcp_m_l_sub`;
export const CONTENT_CODE_URL = `${ BASE_URL }?ref_=sm_w_tup_ln_t_c`;
export const CONTENT_CODE_LINK_URL = `${ BASE_URL }?ref_=sm_w_tup_ln_l_c`;
export const GAME_DISCOUNT_URL = `${ BASE_URL }?ref_=sm_w_tup_p_t_d`;
export const GAME_DISCOUNT_LINK_URL = `${ BASE_URL }?ref_=sm_w_tup_p_t_d`;
export const SUBSCRIPTIONS_PAGE = `${ BASE_URL }?ref_=sm_w_tsp_p_mg_all`;
export const BROWSE_GAMES_URL =  `${ BASE_URL }?${ BROWSE_GAMES_REF }`;
export const TOP_NAV_URL = `${ BASE_URL }?ref=sm_w_ttn_tn_t_all`;

export const BROWSE_GAMES_REF = `ref_=sm_w_twp_p_ub_d`;

let LANGUAGE_TWITCH_TO_DESK = {
  'es': 'es_es'
};

export const STREAMLINE_DETAILS_URL = 'https://www.twitch.tv/directory/game/Streamline/details';
export const US_BLACK_FRIDAY_URL    = 'https://www.amazon.com/Prime-Exclusive-Savings-Video-Games/b/?node=13584215011&ref=Twitch_BF_Banner';
export function getFaqUrl() {
  let lang = Twitch.receivedLanguage;
  let map = LANGUAGE_TWITCH_TO_DESK;
  lang = map[lang] ? map[lang] : lang;
  return `https://help.twitch.tv/customer/${lang}/portal/articles/2572060-twitch-prime-guide`;
}
