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

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