From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001 From: rxliuli Date: Tue, 4 Nov 2025 05:03:50 +0800 Subject: init commit --- src/jet/models/static-message-page.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/jet/models/static-message-page.ts (limited to 'src/jet/models/static-message-page.ts') diff --git a/src/jet/models/static-message-page.ts b/src/jet/models/static-message-page.ts new file mode 100644 index 0000000..91dafb0 --- /dev/null +++ b/src/jet/models/static-message-page.ts @@ -0,0 +1,33 @@ +import { GenericPage } from '@jet-app/app-store/api/models'; + +const contentTypes = [ + 'win-back', + 'carrier', + 'invoice', + 'contingent-price', +] as const; + +export type ContentType = (typeof contentTypes)[number]; + +export class StaticMessagePage extends GenericPage { + constructor({ + titleLocKey, + contentType, + }: { + titleLocKey: string; + contentType: ContentType; + }) { + super([]); + this.titleLocKey = titleLocKey; + this.contentType = contentType; + } + + titleLocKey?: string; + + // Used to indicate which type of content the page needs to show, used to pull in the proper + // LOC keys when rendering + contentType: ContentType; + + // Used in our type guards to narrow a `Page` down to a `StaticMessagePage` + pageType: string = 'staticMessagePage'; +} -- cgit v1.2.3