import 'package:flashlink/config/theme/theme_extensions/theme_extension.dart';

import '../../config/translations/localization_service.dart';

class Assets {
  // 国旗
  static String getCountryFlagImage(String contryCode) {
    if (contryCode.isEmpty) {
      return 'assets/flags/xx.svg';
    } else {
      return 'assets/flags/${contryCode.toLowerCase()}.svg';
    }
  }

  // 流媒体图标
  static String getStreamingIcon(String code) {
    if (code.isEmpty) {
      return 'assets/flags/xx.svg';
    } else {
      return 'assets/images/streaming/${code.toLowerCase()}.png';
    }
  }

  // 默认国旗
  static const String defaultFlag = 'assets/flags/xx.svg';

  static const String splashLogo = 'assets/images/splash_logo.png';
  static const String splashCenterBg = 'assets/images/splash_center_bg.png';

  static const String success = 'assets/images/success.png';
  static const String error = 'assets/images/error.png';

  // 联系我们
  static const String discord = 'assets/vectors/social/discord.svg';
  static const String facebook = 'assets/vectors/social/facebook.svg';
  static const String instagram = 'assets/vectors/social/instagram.svg';
  static const String telegram = 'assets/vectors/social/telegram.svg';
  static const String tiktok = 'assets/vectors/social/tiktok.svg';
  static const String whatsapp = 'assets/vectors/social/whatsapp.svg';
  static const String x = 'assets/vectors/social/x.svg';
  static const String youtube = 'assets/vectors/social/youtube.svg';

  static const String settings = 'assets/vectors/boost/settings.svg';
  static const String switchStatusDisconnected =
      'assets/images/switch_status_disconnected.png';
  static const String switchStatusConnected =
      'assets/images/switch_status_connected.png';
  static const String switchStatusConnecting =
      'assets/images/switch_status_connecting.png';

  // 协议
  static const String flashlinkLogo = 'assets/images/flashlink_logo.png';
  static const String flashlink = 'assets/images/flashlink.png';
  static const String refersh = 'assets/vectors/boost/refersh.svg';

  // 错误页
  static const String _restrictedDark = 'assets/images/dark/restricted.png';
  static const String _oopsDark = 'assets/images/dark/oops.png';

  static const String _restrictedLight = 'assets/images/light/restricted.png';
  static const String _oopsLight = 'assets/images/light/oops.png';

  // 根据主题获取标签资源
  static String get restricted =>
      ReactiveTheme.isLightTheme ? _restrictedLight : _restrictedDark;
  static String get oops => ReactiveTheme.isLightTheme ? _oopsLight : _oopsDark;

  // 连接状态
  static const String disconnected = 'assets/images/disconnected.png';
  static const String connecting = 'assets/images/connecting.png';
  static const String connected = 'assets/images/connected.png';
  static const String connectingError = 'assets/images/vpn_error.png';
  static const String connectionNetworkError = 'assets/images/network.png';

  // 标签资源 - Dark 版本
  static const String _premiumDark = 'assets/images/dark/premium.png';
  static const String _premiumExpiredDark =
      'assets/images/dark/premium_expired.png';
  static const String _testDark = 'assets/images/dark/test.png';
  static const String _freeDark = 'assets/images/dark/free.png';

  // 标签资源 - Light 版本
  static const String _premiumLight = 'assets/images/light/premium.png';
  static const String _premiumExpiredLight =
      'assets/images/light/premium_expired.png';
  static const String _testLight = 'assets/images/light/test.png';
  static const String _freeLight = 'assets/images/light/free.png';

  // 标签资源 - Dark 版本 (CN)
  static const String _premiumDarkCn = 'assets/images/dark/premium_cn.png';
  static const String _premiumExpiredDarkCn =
      'assets/images/dark/premium_expired_cn.png';
  static const String _testDarkCn = 'assets/images/dark/test_cn.png';
  static const String _freeDarkCn = 'assets/images/dark/free_cn.png';

  // 标签资源 - Light 版本 (CN)
  static const String _premiumLightCn = 'assets/images/light/premium_cn.png';
  static const String _premiumExpiredLightCn =
      'assets/images/light/premium_expired_cn.png';
  static const String _testLightCn = 'assets/images/light/test_cn.png';
  static const String _freeLightCn = 'assets/images/light/free_cn.png';

  // 根据主题获取标签资源
  static String get premium => LocalizationService.isChinese()
      ? (ReactiveTheme.isLightTheme ? _premiumLightCn : _premiumDarkCn)
      : (ReactiveTheme.isLightTheme ? _premiumLight : _premiumDark);

  static String get premiumExpired => LocalizationService.isChinese()
      ? (ReactiveTheme.isLightTheme
            ? _premiumExpiredLightCn
            : _premiumExpiredDarkCn)
      : (ReactiveTheme.isLightTheme
            ? _premiumExpiredLight
            : _premiumExpiredDark);

  static String get test => LocalizationService.isChinese()
      ? (ReactiveTheme.isLightTheme ? _testLightCn : _testDarkCn)
      : (ReactiveTheme.isLightTheme ? _testLight : _testDark);

  static String get free => LocalizationService.isChinese()
      ? (ReactiveTheme.isLightTheme ? _freeLightCn : _freeDarkCn)
      : (ReactiveTheme.isLightTheme ? _freeLight : _freeDark);

  //LocalizationService.isCn()

  // 评价
  static const String poutingFace = 'assets/vectors/boost/pouting_face.svg';
  static const String woozyFace = 'assets/vectors/boost/woozy_face.svg';
  static const String yawningFace = 'assets/vectors/boost/yawning_face.svg';
  static const String smirkingFace = 'assets/vectors/boost/smirking_face.svg';
  static const String smilingFaceWithHearts =
      'assets/vectors/boost/smiling_face_with_hearts.svg';

  // 订阅
  static const String subscriptionDiamond =
      'assets/images/subscription_diamond.png';
  static const String _subscriptionWalletDark =
      'assets/images/dark/subscription_wallet.png';
  static const String _subscriptionWalletLight =
      'assets/images/light/subscription_wallet.png';
  static String get subscriptionWallet => ReactiveTheme.isLightTheme
      ? _subscriptionWalletLight
      : _subscriptionWalletDark;

  static const String subscriptionGreenShield =
      'assets/images/subscription_green_shield.png';

  static const String subscriptionPlanChange1 =
      'assets/images/subscription_plan_change_1.png';
  static const String subscriptionPlanChange2 =
      'assets/images/subscription_plan_change_2.png';
  static const String subscriptionPlanChange3 =
      'assets/images/subscription_plan_change_3.png';

  static const String preCodeEmail = 'assets/images/pre_code_email.png';
  static const String preCodeSaveLocal =
      'assets/images/pre_code_save_local.png';
  static const String preCodeEmailTipBlue =
      'assets/images/pre_code_email_tip_blue.png';
  static const String preCodeEmailTipWhite =
      'assets/images/pre_code_email_tip_white.png';

  static const String bannerTest = 'assets/images/banner_test.png';
  static const String subscriptionBg = 'assets/images/subscription_bg.mp4';
  static const String mediaBg = 'assets/images/media_bg.jpg';

  static const String arrowDownCircle = 'assets/vectors/arrow_down_circle.svg';
  static const String arrowDownCircleDark =
      'assets/vectors/arrow_down_circle_dark.svg';
  static const String refreshCircle = 'assets/vectors/refresh_circle.svg';
  static const String refreshCircleDark =
      'assets/vectors/refresh_circle_dark.svg';
  static const String successCircle = 'assets/vectors/success_circle.svg';
  static const String failedCircle = 'assets/vectors/failed_circle.svg';

  static const String pushNotifications =
      'assets/vectors/push_notifications.svg';
  static const String update = 'assets/vectors/update.svg';

  // 连接按钮中间的图片
  static const String darkDisconnected =
      'assets/images/round/dark_disconnected.png';
  static const String lightDisconnected =
      'assets/images/round/light_disconnected.png';
  static const String darkConnected = 'assets/images/round/dark_connected.png';
  static const String lightConnected =
      'assets/images/round/light_connected.png';
  static const String darkConnecting =
      'assets/images/round/dark_connecting.png';
  static const String lightConnecting =
      'assets/images/round/light_connecting.png';
  static const String darkDisconnecting =
      'assets/images/round/dark_disconnecting.png';

  static const String settingsTheme = 'assets/vectors/settings_theme.svg';

  // windows 托盘图标
  static const String trayIconDarkConnectedWin =
      'assets/trayicon/dark/connected.ico';
  static const String trayIconDarkUnConnectedWin =
      'assets/trayicon/dark/unconnected.ico';
  static const String trayIconLightConnectedWin =
      'assets/trayicon/light/connected.ico';
  static const String trayIconLightUnConnectedWin =
      'assets/trayicon/light/unconnected.ico';

  // 权益图标
  static const String _equity1Dark = 'assets/images/dark/equity1.png';
  static const String _equity1Light = 'assets/images/light/equity1.png';
  static const String _equity2Dark = 'assets/images/dark/equity2.png';
  static const String _equity2Light = 'assets/images/light/equity2.png';
  static const String _equity3Dark = 'assets/images/dark/equity3.png';
  static const String _equity3Light = 'assets/images/light/equity3.png';
  static const String _equity4Dark = 'assets/images/dark/equity4.png';
  static const String _equity4Light = 'assets/images/light/equity4.png';
  static const String _equity5Dark = 'assets/images/dark/equity5.png';
  static const String _equity5Light = 'assets/images/light/equity5.png';
  static const String _equity6Dark = 'assets/images/dark/equity6.png';
  static const String _equity6Light = 'assets/images/light/equity6.png';

  static String get equity1 =>
      ReactiveTheme.isLightTheme ? _equity1Light : _equity1Dark;
  static String get equity2 =>
      ReactiveTheme.isLightTheme ? _equity2Light : _equity2Dark;
  static String get equity3 =>
      ReactiveTheme.isLightTheme ? _equity3Light : _equity3Dark;
  static String get equity4 =>
      ReactiveTheme.isLightTheme ? _equity4Light : _equity4Dark;
  static String get equity5 =>
      ReactiveTheme.isLightTheme ? _equity5Light : _equity5Dark;
  static String get equity6 =>
      ReactiveTheme.isLightTheme ? _equity6Light : _equity6Dark;

  static const String menus = 'assets/images/menus.png';
}
