this repo has no description
1import { GenericPage } from '@jet-app/app-store/api/models';
2
3const contentTypes = [
4 'win-back',
5 'carrier',
6 'invoice',
7 'contingent-price',
8] as const;
9
10export type ContentType = (typeof contentTypes)[number];
11
12export class StaticMessagePage extends GenericPage {
13 constructor({
14 titleLocKey,
15 contentType,
16 }: {
17 titleLocKey: string;
18 contentType: ContentType;
19 }) {
20 super([]);
21 this.titleLocKey = titleLocKey;
22 this.contentType = contentType;
23 }
24
25 titleLocKey?: string;
26
27 // Used to indicate which type of content the page needs to show, used to pull in the proper
28 // LOC keys when rendering
29 contentType: ContentType;
30
31 // Used in our type guards to narrow a `Page` down to a `StaticMessagePage`
32 pageType: string = 'staticMessagePage';
33}