/**
 * 存储键常量
 *
 * 键名沿用 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",
  facebookId: "facebook_id",

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

  // chat
  chatHistory: "chat_history",

  // pwa / app info
  lastPwaDialogShown: "last_pwa_dialog_shown",
  lastExternalBrowserDialogShown: "last_external_browser_dialog_shown",
  lastPwaEventReported: "last_pwa_event_reported",
  lastAppInfoReported: "last_app_info_reported",

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

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