forked from phenom/healer-man
19 lines
741 B
TypeScript
19 lines
741 B
TypeScript
export type ContentCategoryId = "wow" | "rom" | "coa";
|
|
|
|
export interface ContentCategoryDefinition {
|
|
readonly id: ContentCategoryId;
|
|
readonly label: string;
|
|
readonly name: string;
|
|
}
|
|
|
|
/** Character-creation categories; other catalogs may expose a supported subset. */
|
|
export const CONTENT_CATEGORIES: readonly ContentCategoryDefinition[] = Object.freeze([
|
|
{ id: "wow", label: "WoW", name: "World of Warcraft" },
|
|
{ id: "rom", label: "RoM", name: "Runes of Magic" },
|
|
{ id: "coa", label: "CoA", name: "Conquest of Azeroth" },
|
|
]);
|
|
|
|
export function contentCategoryById(id: ContentCategoryId | null | undefined): ContentCategoryDefinition {
|
|
return CONTENT_CATEGORIES.find((category) => category.id === id) ?? CONTENT_CATEGORIES[0];
|
|
}
|