const CURRENT_ENV = process.env.NODE_ENV === 'production' ? 'production' : 'development'

export const ENV_CONFIG = {
  development: {
    API_BASE_URL: 'https://shop-api.websoft.top/api',
    SERVER_API_URL: 'https://server.websoft.top/api',
    APP_NAME: '鑫龙家电',
    DEBUG: 'true',
  },
  test: {
    API_BASE_URL: 'https://shop-api.websoft.top/api',
    SERVER_API_URL: 'https://server.websoft.top/api',
    APP_NAME: '鑫龙家电',
    DEBUG: 'true',
  },
  production: {
    API_BASE_URL: 'https://shop-api.websoft.top/api',
    SERVER_API_URL: 'https://server.websoft.top/api',
    APP_NAME: '鑫龙家电',
    DEBUG: 'false',
  },
}

export function getEnvConfig() {
  return ENV_CONFIG[CURRENT_ENV] || ENV_CONFIG.development
}

export const { API_BASE_URL, SERVER_API_URL, APP_NAME, DEBUG } = getEnvConfig()
