class Constants {
  Constants._();

  static const String env = envProd;

  static const String envDev = 'dev';

  static const String envTest = 'test';

  static const String envProd = 'prod';

  static const String _devBaseUrl = "http://192.168.10.68:56389";

  static const String _testBaseUrl = "http://loc-api.v8dashen.com";

  static const String _prodBaseUrl = "http://loc-api.v8dashen.com";

  static const String locationClientUrl =
      "ws://loc-api.v8dashen.com/websocket/";

  static String baseUrl = getBaseUrl();

  static bool isProdEnv() {
    return Constants.env == Constants.envProd;
  }

  static const String appDefaultChannel = "Android";
  static const int appDefaultAppId = 0;
  static const int appDefaultTgPlatformId = 0;
  static const String appChanelName = "app_channel_name";
  static const String appChannelId = "app_channel_id";
  static const String appTgPlatformId = "app_tg_platform_id";

  static const String mineLocationId = '';
  static const String traceStartId = '-100';
  static const String traceEndId = '-200';

  static const double blurredX = 4.2;
  static const double blurredY = 4.2;

  static const String keyLastSelectFriendId = 'key_last_select_friend_id';
}

String getBaseUrl() {
  switch (Constants.env) {
    case Constants.envDev:
      return Constants._devBaseUrl;
    case Constants.envTest:
      return Constants._testBaseUrl;
    case Constants.envProd:
      return Constants._prodBaseUrl;
    default:
      return Constants._devBaseUrl;
  }
}

