'use strict';

var url = require('./url.js');

const envConfigs = {
  // 本地开发环境
  development: { url: "https://manage-dev.giikin.cn", tenant: "giikin", domain: "manage-dev.giikin.cn" },
  // 前后端联调的开发环境
  dev: { url: "https://manage-dev.giikin.cn", tenant: "giikin", domain: "manage-dev.giikin.cn" },
  develop: { url: "https://manage-dev.giikin.cn", tenant: "giikin", domain: "manage-dev.giikin.cn" },
  // 测试环境
  test: { url: "https://manage-test.giikin.cn", tenant: "giikin", domain: "manage-test.giikin.cn" },
  // 预发布环境
  release: { url: "https://manage-pre.giikin.com", tenant: "giikin", domain: "manage-pre.giikin.com" },
  // 生产环境
  production: { url: "https://manage.giikin.com", tenant: "giikin", domain: "manage.giikin.com" },
  // 租户：吉客拓客
  "giiktok.production": { url: "https://manage.kingkungmeta.com", tenant: "giiktok", domain: "manage.kingkungmeta.com" }
};
const getEnvConfig = (mode) => {
  if (!mode) return envConfigs.development;
  return envConfigs[mode] || envConfigs.development;
};
const createModes = (options) => {
  const { developmentPath, serviceType } = options;
  return Object.keys(envConfigs).map((mode) => {
    if (mode === "development") {
      return { mode, url: developmentPath };
    }
    return { mode, url: url.urlJoin(envConfigs[mode].url, serviceType) };
  });
};

exports.createModes = createModes;
exports.envConfigs = envConfigs;
exports.getEnvConfig = getEnvConfig;
//# sourceMappingURL=createModes.js.map
