nitro-react/src/events/notification-center/NotificationAlertEvent.ts

56 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-08-26 08:38:16 +02:00
import { NitroEvent } from '@nitrots/nitro-renderer';
2021-09-18 10:31:08 +02:00
export class NotificationAlertEvent extends NitroEvent
2021-08-26 08:38:16 +02:00
{
2021-09-18 10:31:08 +02:00
public static ALERT: string = 'NAE_ALERT';
2021-08-26 08:38:16 +02:00
2021-09-18 10:31:08 +02:00
private _messages: string[];
private _alertType: string;
2021-08-26 08:38:16 +02:00
private _clickUrl: string;
private _clickUrlText: string;
private _title: string;
private _imageUrl: string;
2021-09-18 10:31:08 +02:00
constructor(messages: string[], alertType: string = null, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null)
2021-08-26 08:38:16 +02:00
{
2021-09-18 10:31:08 +02:00
super(NotificationAlertEvent.ALERT);
2021-08-26 08:38:16 +02:00
2021-09-18 10:31:08 +02:00
this._messages = messages;
this._alertType = alertType;
2021-08-26 08:38:16 +02:00
this._clickUrl = clickUrl;
this._clickUrlText = clickUrlText;
this._title = title;
this._imageUrl = imageUrl;
}
2021-09-18 10:31:08 +02:00
public get messages(): string[]
2021-08-26 08:38:16 +02:00
{
2021-09-18 10:31:08 +02:00
return this._messages;
}
public get alertType(): string
{
return this._alertType;
2021-08-26 08:38:16 +02:00
}
public get clickUrl(): string
{
return this._clickUrl;
}
public get clickUrlText(): string
{
return this._clickUrlText;
}
public get title(): string
{
return this._title;
}
public get imageUrl(): string
{
return this._imageUrl;
}
}