export enum Environment {
  LOCAL = 'local',
  DEV = 'dev',
  TEST = 'test',
  ITEST = 'itest',
  FTEST = 'ftest',
  PROD = 'prod'
}

export interface EnvironmentConfig {
  baseUrl: string;
  // 可以添加更多环境相关的配置
}


export const getEnvironmentConfig = (platform: string): Record<Environment, EnvironmentConfig> => {
  let name = ''
  if(platform === 'plaso'){
    name = 'plaso'
  }else if(platform === 'ai'){
    name = 'aiwenyun'
  }

  return {
    [Environment.LOCAL]: {
      baseUrl: 'http://localhost:9527',
    },
    [Environment.DEV]: {
      baseUrl: `http://dev.${name}.cn/static/yxt`,
    },
    [Environment.TEST]: {
      baseUrl: `http://test.${name}.cn/static/yxt`,
    },
    [Environment.ITEST]: {
      baseUrl: `http://itest.${name}.cn/static/yxt`,
    },
    [Environment.FTEST]: {
      baseUrl: `http://ftest.${name}.cn/static/yxt`,
    },
    [Environment.PROD]: {
      baseUrl: `https://www.${name}.cn/static/yxt`,
    }
  };
};
