export const DUNGEON_RELEASE_STAGES = ["full-release", "beta", "alpha"] as const; export type DungeonReleaseStage = (typeof DUNGEON_RELEASE_STAGES)[number]; export const DUNGEON_RELEASE_STAGE_LABELS: Readonly> = { "full-release": "Full Release", beta: "Beta", alpha: "Alpha", }; export function dungeonReleaseStage(id: string): DungeonReleaseStage { return id === "stormwind-stockade" || id === "bite-sized-stormwind-stockade" ? "beta" : "alpha"; } export function compareDungeonReleaseOrder( left: { readonly title: string; readonly releaseStage: DungeonReleaseStage }, right: { readonly title: string; readonly releaseStage: DungeonReleaseStage }, ): number { return DUNGEON_RELEASE_STAGES.indexOf(left.releaseStage) - DUNGEON_RELEASE_STAGES.indexOf(right.releaseStage) || left.title.localeCompare(right.title, "en", { sensitivity: "base" }); }