/* @flow */
import utils from '../utils';

export default {
  NODE_ENV: process.env.NODE_ENV || 'development',
  IS_ENV_DEVELOPMENT: process.env.NODE_ENV === 'development',
  IS_ENV_PRODUCTION: process.env.NODE_ENV === 'production',
  AUTH0_DOMAIN: process.env.REACT_APP_AUTH0_DOMAIN,
  AUTH0_CLIENT_ID: process.env.REACT_APP_AUTH0_CLIENT_ID,
  AUTH0_AUDIENCE: process.env.REACT_APP_AUTH0_AUDIENCE,
  DOCS_URL: process.env.REACT_APP_DOCS_URL || '',
  STRIPE_PUBLIC_KEY: process.env.REACT_APP_STRIPE_PUBLIC_KEY,
  STRIPE_FREE_PLAN_ID: process.env.REACT_APP_STRIPE_FREE_PLAN_ID,
  STRIPE_PRO_PLAN_ID: process.env.REACT_APP_STRIPE_PRO_PLAN_ID,
  STRIPE_PRO_PLAN_AMOUNT: utils.toInt(process.env.REACT_APP_STRIPE_PRO_PLAN_AMOUNT, 399),
  MAX_API_TOKENS_PER_USER: utils.toInt(process.env.REACT_APP_MAX_API_TOKENS_PER_USER, 5),
  RATE_LIMIT_FOR_UNAUTHENTICATED_REQUESTS: utils.toInt(
    process.env.REACT_APP_RATE_LIMIT_FOR_UNAUTHENTICATED_REQUESTS,
    100
  ),
  RATE_LIMIT_FOR_FREE_USER_REQUESTS: utils.toInt(
    process.env.REACT_APP_RATE_LIMIT_FOR_FREE_USER_REQUESTS,
    1000
  ),
  RATE_LIMIT_FOR_PRO_USER_REQUESTS: utils.toInt(
    process.env.REACT_APP_RATE_LIMIT_FOR_PRO_USER_REQUESTS,
    10000
  ),
  GOOGLE_ANALYTICS_TRACKING_ID: process.env.REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID,
  GOOGLE_SITE_VERIFICATION: process.env.REACT_APP_GOOGLE_SITE_VERIFICATION,
};
