/**
 * 存储键常量
 *
 * 键名沿用 Dart `lib/data/services/storage/storage_keys.dart` 的下划线风格，
 * 便于跨端调试时直接对位。`as const` 让每个值都是字符串字面量类型，
 * 未来若需要可用 `z.literal(StorageKeys.loginToken)` 做编译期键名校验。
 */

export const StorageKeys = {
  // auth
  loginToken: "login_token",
  loginProvider: "login_provider",
  guestToken: "guest_token",
  deviceId: "device_id",
  refreshToken: "refresh_token",
  asid: "asid",
  psid: "psid",
  storageMigrationVersion: "storage_migration_version",

  // user
  user: "user",
  userId: "user_id",
  userAvatar: "user_avatar",
  userEntitlementSnapshot: "user_entitlement_snapshot",

  // chat
  chatHistory: "chat_history",
  pendingChatImageReturn: "pending_chat_image_return",
  pendingChatUnlock: "pending_chat_unlock",
  pendingChatPromotion: "pending_chat_promotion",

  // pwa / app info
  pwaDialogShown: "pwa_dialog_shown",
  lastPwaEventReported: "last_pwa_event_reported",
  lastAppInfoReported: "last_app_info_reported",
  firstRechargeOfferBannerDismissed: "first_recharge_offer_banner_dismissed",

  // payment
  pendingPaymentOrder: "pending_payment_order",
  paymentPlans: "payment_plans",
} as const;

export type StorageKey = (typeof StorageKeys)[keyof typeof StorageKeys];
