| 1 | /** |
| 2 | * The kinds the room knows, one line each. A kind without a line here can't |
| 3 | * be made yet: the service says it is coming. Append only; never reformat |
| 4 | * (parallel phases each add their line). |
| 5 | */ |
| 6 | import type { FolioKind } from "@g1t/contracts"; |
| 7 | |
| 8 | import { doc } from "./doc/index.ts"; |
| 9 | import type { KindModel } from "./types.ts"; |
| 10 | |
| 11 | export const KINDS: Partial<Record<FolioKind, KindModel>> = { |
| 12 | doc, |
| 13 | }; |
| 14 | |
| 15 | /** The kind's model, or null when it isn't built yet. */ |
| 16 | export function kindModel(kind: string | null | undefined): KindModel | null { |
| 17 | return (KINDS as Record<string, KindModel | undefined>)[String(kind ?? "")] ?? null; |
| 18 | } |