const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';

const hostMap = {
  apiHost: `${protocol}//quantum-blocks-qa.liangkebang.net`,
  h5Host: `${protocol}//quantum-h5-qa.liangkebang.net`,
  opapiHost: '${protocol}//opapi-qa.liangkebang.net',
  qiniuHost: `${protocol}//appsync.lkbang.net`,
  shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
  qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
  talosHost: 'https://talos-qa.liangkebang.net',
  kdspHost: 'https://kdsp-api-qa.liangkebang.net',
  yxmTenantId: 560761
};

if (EASY_ENV_IS_BROWSER) {
  const apolloCfg = window.apollo || window.__INITIAL_STATE__.apollo;
  if (apolloCfg) {
    for (const key in apolloCfg) {
      if (apolloCfg[key]) {
        hostMap[key] = apolloCfg[key];
      }
    }
  }
}

export default hostMap;
