const LEGACY_CHARACTER_ID_ALIASES: Readonly<Record<string, string>> =
  Object.freeze({
    character_elio: "elio",
    character_maya: "maya-tan",
    character_nayeli: "nayeli-cervantes",
  });

/**
 * Converts character IDs persisted by pre-catalog releases to the current
 * backend IDs. Unknown and already-current IDs pass through unchanged.
 */
export function normalizeLegacyCharacterId(characterId: string): string {
  return LEGACY_CHARACTER_ID_ALIASES[characterId] ?? characterId;
}
