summaryrefslogtreecommitdiff
path: root/src/jet/models/static-message-page.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/jet/models/static-message-page.ts')
-rw-r--r--src/jet/models/static-message-page.ts33
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';
+}