import { type CoreLang } from '@src/src/app/aurora.types';

/**
 * Single-key persisted session for the admin SPA. Add new optional fields
 * as new consumers appear (theme, sidebar collapsed, last visited route, ...).
 *
 * Stored as JSON under a single localStorage key (`aurora.session.v1`).
 * The version suffix lets us invalidate everything when the shape changes
 * incompatibly — bump it and consumers see `{}` until they repopulate.
 */
export interface AuroraSession {
  /** System languages cached from the upstream `coreGetLangs` adapter. */
  langs?: CoreLang[];
  /** Epoch millis when `langs` was last fetched. Used for TTL freshness checks. */
  langsCachedAt?: number;
}
