import 'dart:io';

class Constants {
  static const String POLICY_URL = "https://m2blocks.gurugame.fun/policy.html";
  static const String TERMS_URL = "https://m2blocks.gurugame.fun/termsofservice.html";

  static const String EMAIL_ADDRESS = "m2blocks@fungame.studio";

  static const String AndroidAppStoreUrl =
      "https://play.google.com/store/apps/details?id=merge.blocks.drop.number.puzzle.games";
  static const String IosAppStoreUrl = "https://apps.apple.com/app/id1564391515";

  static const String InviteTranslationUrl = "https://docs.google.com/forms/d/e/1FAIpQLScFplG0dKS4XcJ_MoXbpD9-qfGFdVSIiNu-hx16psmz0GWryA/viewform?usp=sf_link";
  static const String saasAppId = "m2-block";
  static const String saasApiDevHost = "https://dev.saas.castbox.fm";
  static const String saasApiHost = "https://saas.castbox.fm";
  static const String saasApiTestHost = "mock_host";

  static const String authority = "m2blocks.fungame.studio";

  static const String storagePrefix =
      "https://firebasestorage.googleapis.com/v0/b/m2-block.appspot.com/o";

  static const String defaultCdnPrefix = "https://cdn2.m2blocks.fungame.studio";

  // static const String facebookCpmCalibrationUrl = "$saasApiHost/third-party-data/api/v1/facebook/query/cpm";

  static const String serverTimeBaseUrl = "https://saas.castbox.fm/tool/api/v1/system/time";

  static const String storageSeparator = "%2F";

  static const String gameStoragePath = "game";

  static const String avatarStoragePath = "avatars";

  static const int fatalThreshold = 5;

  static String buildAvatarConfigUrl(String configName) {
    return "$storagePrefix/$avatarStoragePath$storageSeparator$configName.json?alt=media";
  }

  static String buildAvatarUrl(String configName, {String suffix = "png"}) {
    return "$storagePrefix/$avatarStoragePath$storageSeparator$configName.$suffix?alt=media";
  }

  static String get storeUrl {
    if (Platform.isIOS) {
      return Constants.IosAppStoreUrl;
    } else {
      return Constants.AndroidAppStoreUrl;
    }
  }
}
