/**
* Activity-category slugs for public profile docs (and M5 feed shards —
* docs/PROTOCOL.md §2 `shard = "<category>|<countySlug>"`). 19 curated wire
* slugs; display labels live in the locale files (catSport …).
*
* The list is the CURATED UI vocabulary (pickers, labels), not a wire enum:
* the wire shape-validates slugs (public-doc isSlug) so additions here are
* append-only and never a breaking change. Existing slugs are stable forever.
* "general" is deliberately first — it is the default landing shard.
*/
import type { MsgKey } from "../app/i18n";
export const CATEGORY_SLUGS = [
"general",
"sport",
"drumetii",
"calatorii",
"dans",
"arta",
"jocuri",
"gastronomie",
"invatare",
"muzica",
"afaceri",
"tech",
"filme-seriale",
"carti",
"voluntariat",
"parinti",
"animale",
"foto",
"partener-viata",
] as const;
export type CategorySlug = (typeof CATEGORY_SLUGS)[number];
const LABEL_KEYS: Record<CategorySlug, MsgKey> = {
general: "catGeneral",
sport: "catSport",
drumetii: "catDrumetii",
calatorii: "catCalatorii",
dans: "catDans",
arta: "catArta",
jocuri: "catJocuri",
gastronomie: "catGastronomie",
invatare: "catInvatare",
muzica: "catMuzica",
afaceri: "catAfaceri",
tech: "catTech",
"filme-seriale": "catFilmeSeriale",
carti: "catCarti",
voluntariat: "catVoluntariat",
parinti: "catParinti",
animale: "catAnimale",
foto: "catFoto",
"partener-viata": "catPartenerViata",
};
export function isCategorySlug(v: unknown): v is CategorySlug {
return typeof v === "string" && (CATEGORY_SLUGS as readonly string[]).includes(v);
}
/** i18n key for a category slug (t(categoryKey(slug)) → display label). */
export function categoryKey(slug: CategorySlug): MsgKey {
return LABEL_KEYS[slug];
}