/**
 * 客户端配置管理模块
 *
 * 功能说明:
 * 所有配置从根目录的 client-configs.json 文件中读取
 */

// 获取当前用户端配置
export const getCurrentConfig = () => {
  return {
    clientId: "6",
    appId: "wx5e79df5996572539",
    name: "小七",
    theme: {
      "theme-color-800": "#0B7034",
      "theme-color-700": "#0B5C2D",
      "theme-color-500": "#0CCD58",
      "theme-color-100": "#E8FFF1",
      "theme-color-50": "#F0F8F3",
    },
  };
};
export const clientId = getCurrentConfig().clientId;
export const appId = getCurrentConfig().appId;

/// 客户端类型
export const ClientType = {
  // 智念
  ZHINIAN: "ZHINIAN",
  // 小七
  XIAOQI: "XIAOQI",
  // 朵花
  DUOHUA: "DUOHUA",
  // 天沐
  TIANMU: "TIANMU",
  // 念念助手
  NIANHELPER: "NIANHELPER",
};

/// 获取当前客户端类型
export const currentClientType = () => {
  switch (getCurrentConfig().name) {
    case "念念":
      return ClientType.ZHINIAN;
    case "小七":
      return ClientType.XIAOQI;
    case "朵朵":
      return ClientType.DUOHUA;
    case "沐沐":
      return ClientType.TIANMU;
    case "念念助手":
      return ClientType.NIANHELPER;
    default:
      return ClientType.ZHINIAN;
  }
};

// 环境配置 - 智念客户端使用测试环境，其他客户端使用生产环境
export const isZhiNian = true;
