aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/notifications/utilities/notification.config.ts
blob: d10ce02f7b6ece9b6dd8391537d791d5ff483ed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Type, ComponentRef } from '@angular/core';

export type NotificationType =
    "info" | "warning" | "error" | "success";

export class NotificationSettings {

    public type: NotificationType;
    public notifyText: string;
    public notifyTitle: string;
    public sticky: boolean;
    public hasCustomContent: boolean;
    public duration: number;
    public innerComponentType: Type<any>;
    public innerComponentOptions: any;

    constructor(type: NotificationType, notifyText: string, notifyTitle: string, duration: number = 10000, sticky: boolean = false, hasCustomContent:boolean = false, innerComponentType?:Type<any>, innerComponentOptions? :any) {

        this.type = type;
        this.notifyText = notifyText;
        this.notifyTitle = notifyTitle;
        this.duration = duration;
        this.sticky = sticky;
        this.hasCustomContent = hasCustomContent;
        this.innerComponentType = innerComponentType;
        this.innerComponentOptions = innerComponentOptions;
    }


}