import React from 'react';
import { FormattedMessage } from 'react-intl';
import globalMessages from '../Cap/messages';

export const GET_SIDEBAR_REQUEST = 'app/App/GET_SIDEBAR_REQUEST';
export const GET_SIDEBAR_SUCCESS = 'app/App/GET_SIDEBAR_SUCCESS';
export const GET_SIDEBAR_FAILURE = 'app/App/GET_SIDEBAR_FAILURE';

export const getTopbarMenuDataValue = () => ([
      { label: <FormattedMessage {...globalMessages.campaigns} />, link: '/campaigns/ui/list', key: 'campaigns' },
      { label: <FormattedMessage {...globalMessages.journeys} />, link: '/journey/ui', key: 'journeys' },
      { label: <FormattedMessage {...globalMessages.audience} />, link: '/audience-manager/list', key: 'audience' },
      { label: <FormattedMessage {...globalMessages.incentive} />, link: '/coupons/ui/', key: 'incentive' },
      { label: <FormattedMessage {...globalMessages.creatives} />, link: '/creatives/ui/v2', key: 'creatives' },
]);

export const getLoyaltyTopbarMenuDataValue = () => [
  {
    label: <FormattedMessage {...globalMessages.programs} />,
    link: 'loyalty/ui/',
    key: 'programs',
  },
  {
    label: <FormattedMessage {...globalMessages.promotions} />,
    link: 'loyalty/ui/promotions/list',
    key: 'promotions',
  },
  {
    label: <FormattedMessage {...globalMessages.creatives} />,
    link: '/creatives/ui/v2/loyalty',
    key: 'creatives',
  },
];

export const TRACK_CREATE_SMS = 'createSms';
export const TRACK_CREATE_EMAIL = 'createEmail';
export const TRACK_CREATE_MPUSH = 'createMpush';
export const TRACK_CREATE_WECHAT = 'createWeChat';
export const TRACK_CREATE_IMAGE = 'createImage';
export const TRACK_CREATE_LINE = 'createLine';
export const TRACK_CREATE_VIBER = 'createViber';
export const TRACK_CREATE_FACEBOOK = 'createFacebook';
export const TRACK_CREATE_WEBPUSH = 'createWebPush';

export const CREATE = 'create';
export const EDIT = 'edit';
export const PREVIEW = 'preview';

export const VIBER = 'viber';
export const FACEBOOK = 'facebook';
export const WHATSAPP = 'whatsapp';
export const RCS = 'rcs';
export const LINE = 'line';
export const EMAIL = 'email';
export const ASSETS = 'assets';
export const ZALO = 'zalo';
export const INAPP = 'inapp';
export const WEBPUSH = 'webpush';

export const JP_LOCALE_HIDE_FEATURE = 'JP_LOCALE_HIDE_FEATURE';

export const TRACK_EDIT_SMS = 'editSms';
export const TRACK_EDIT_EMAIL = 'editEmail';
export const TRACK_EDIT_MPUSH = 'editMpush';
export const TRACK_EDIT_WECHAT = 'editWeChat';
export const TRACK_EDIT_IMAGE = 'editImage';
export const TRACK_EDIT_LINE = 'editLine';
export const TRACK_EDIT_VIBER = 'editViber';
export const TRACK_EDIT_FACEBOOK = 'editFacebook';
export const TRACK_EDIT_WEBPUSH = 'editWebPush';

export const CHANNEL_CREATE_TRACK_MAPPING = {
  sms: TRACK_CREATE_SMS,
  email: TRACK_CREATE_EMAIL,
  mobilepush: TRACK_CREATE_MPUSH,
  wechat: TRACK_CREATE_WECHAT,
  gallery: TRACK_CREATE_IMAGE,
  line: TRACK_CREATE_LINE,
  viber: TRACK_CREATE_VIBER,
  facebook: TRACK_CREATE_FACEBOOK,
  webpush: TRACK_CREATE_WEBPUSH,
};

export const CHANNEL_EDIT_TRACK_MAPPING = {
  sms: TRACK_EDIT_SMS,
  email: TRACK_EDIT_EMAIL,
  mobilepush: TRACK_EDIT_MPUSH,
  wechat: TRACK_EDIT_WECHAT,
  gallery: TRACK_EDIT_IMAGE,
  line: TRACK_EDIT_LINE,
  viber: TRACK_EDIT_VIBER,
  facebook: TRACK_EDIT_FACEBOOK,
  webpush: TRACK_EDIT_WEBPUSH,
};
export const GTM_TRACKING_ID = 'UA-110024621-2';
export const BEE_PLUGIN = 'BEE_PLUGIN';
export const NO_COMMUNICATION = 'NO_COMMUNICATION';
export const FTP = 'FTP';
export const CREATIVES_UI_VIEW = 'CREATIVES_UI_VIEW';

export const APPLY_NOW = <FormattedMessage {...globalMessages.applyNow} />;
export const NO_CALL_TO_ACTION = <FormattedMessage {...globalMessages.noCallToAction} />;
export const LEARN_MORE = <FormattedMessage {...globalMessages.learnMore} />;
export const SHOP_NOW = <FormattedMessage {...globalMessages.shopNow} />;
export const SIGN_UP = <FormattedMessage {...globalMessages.signUp} />;
export const SUBSCRIBE = <FormattedMessage {...globalMessages.subscribe} />;
export const WATCH_MORE = <FormattedMessage {...globalMessages.watchMore} />;


export const FB_AD_CALL_TO_ACTION = {
  NO_CALL_TO_ACTION,
  APPLY_NOW,
  LEARN_MORE,
  SHOP_NOW,
  SIGN_UP,
  SUBSCRIBE,
  WATCH_MORE,
};


export const CREATIVES = 'creatives';
export const LOYALTY = 'loyalty';

export const FAILURE = 'FAILURE';
export const DATE_DISPLAY_FORMAT = 'D MMM YYYY';
export const TIME_DISPLAY_FORMAT = 'hh:mm A';
export const EXTERNAL_URL = 'EXTERNAL_URL';
export const URL = 'URL';
export const SITE_URL = 'SITE_URL';
