diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /src/jet/models/static-message-page.ts | |
init commit
Diffstat (limited to 'src/jet/models/static-message-page.ts')
| -rw-r--r-- | src/jet/models/static-message-page.ts | 33 |
1 files changed, 33 insertions, 0 deletions
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'; +} |
