class StorageKeys {
  StorageKeys._();

  // ===== 多账号管理 =====
  static const String accountList = 'account_list';           // 账号列表 (JSON 数组)
  static const String currentAccountId = 'current_account_id'; // 当前活跃账号ID (userSerialNum)

  // 账号信息
  static const String userSerialNum = 'user_serial_num';      // 用户序列号
  static const String username = 'username';                   // 随机用户名
  static const String avatarSvg = 'avatar_svg';               // 随机 SVG 头像（初始生成）
  static const String avatarUrl = 'avatar_url';               // 用户上传的头像URL
  static const String referralCode = 'referral_code';         // 推荐码
  static const String inviterSequence = 'inviter_sequence';   // 推荐人序列号
  static const String inviterReferralCode = 'inviter_referral_code'; // 邀请人推荐码（注册前临时存储）
  static const String isAccountCreated = 'is_account_created'; // 账号是否已创建
  static const String phoneNumber = 'phone_number';           // 绑定的手机号
  static const String isPasswordSet = 'is_password_set';      // 登录密码是否已设置

  /// 生成带账号前缀的存储键
  /// 用于多账号隔离存储
  static String withAccountPrefix(String accountId, String key) {
    return 'account_${accountId}_$key';
  }

  // 钱包信息
  static const String walletAddressBsc = 'wallet_address_bsc';
  static const String walletAddressKava = 'wallet_address_kava';
  static const String walletAddressDst = 'wallet_address_dst';
  static const String mnemonic = 'mnemonic';                   // 12 词助记词
  static const String isWalletReady = 'is_wallet_ready';       // 钱包是否已就绪
  static const String isMnemonicBackedUp = 'is_mnemonic_backed_up'; // 助记词是否已备份

  // Token
  static const String accessToken = 'access_token';
  static const String refreshToken = 'refresh_token';

  // Settings
  static const String locale = 'locale';
  static const String themeMode = 'theme_mode';
  static const String isFirstLaunch = 'is_first_launch';
  static const String biometricEnabled = 'biometric_enabled';

  // Device
  static const String deviceId = 'device_id';
  static const String deviceName = 'device_name';

  // Planting Location (种植省市选择)
  static const String plantingProvinceName = 'planting_province_name';
  static const String plantingProvinceCode = 'planting_province_code';
  static const String plantingCityName = 'planting_city_name';
  static const String plantingCityCode = 'planting_city_code';

  // Cache
  static const String lastSyncTime = 'last_sync_time';
  static const String cachedRankingData = 'cached_ranking_data';
  static const String cachedMiningStatus = 'cached_mining_status';
  static const String cachedAppAssets = 'cached_app_assets';
  static const String cachedCustomerServiceContacts = 'cached_customer_service_contacts';

  // ===== 已废弃 (保留用于迁移旧数据) =====
  @Deprecated('Use userSerialNum instead')
  static const String userId = 'user_id';
  @Deprecated('Use userSerialNum instead')
  static const String accountSequence = 'account_sequence';
  @Deprecated('Use isAccountCreated instead')
  static const String isWalletCreated = 'is_wallet_created';
  @Deprecated('MPC share no longer stored locally')
  static const String mpcClientShareData = 'mpc_client_share_data';
  @Deprecated('MPC share no longer stored locally')
  static const String mpcPublicKey = 'mpc_public_key';
  @Deprecated('MPC share no longer stored locally')
  static const String mpcEncryptedShare = 'mpc_encrypted_share';
  @Deprecated('MPC share no longer stored locally')
  static const String mpcShareIv = 'mpc_share_iv';
  @Deprecated('MPC share no longer stored locally')
  static const String mpcShareAuthTag = 'mpc_share_auth_tag';
  @Deprecated('No longer used')
  static const String walletAddress = 'wallet_address';
  @Deprecated('No longer used')
  static const String privateKey = 'private_key';
  @Deprecated('No longer used')
  static const String userProfile = 'user_profile';
}
