Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

codexArtifactTemplatesCopy.ts

25 lines875 Bytes

1import { mFallback, msg } from "gt-i18n";
2import type { MFunctionType } from "gt-i18n/types";
3​
4import type { CodexArtifactTemplateKind } from "./codexArtifactTemplates.ts";
5​
6const PRESENTATION_LABEL_BY_KIND = {
7 document: msg("Document template"),
8 presentation: msg("Presentation template"),
9 spreadsheet: msg("Spreadsheet template"),
10 site: msg("Site template"),
11 "google-docs": msg("Google Doc template"),
12 "google-slides": msg("Google Slides template"),
13 "google-sheets": msg("Google Sheet template"),
14 image: msg("Image template"),
15 email: msg("Email template"),
16 slack: msg("Slack template"),
17} satisfies Record<CodexArtifactTemplateKind, string>;
18​
19/** @public */
20export function codexArtifactTemplatePresentationLabel(
21 kind: CodexArtifactTemplateKind,
22 resolve: MFunctionType = mFallback,
23): string {
24 return resolve(PRESENTATION_LABEL_BY_KIND[kind]);