import { Action } from '@ngrx/store'; import { GlobalNotificationId, GlobalNotificationItemInterface } from '../models/global-notification.interface'; export enum GlobalNotificationActionTypes { AddNotification = '[Global Notification] Add', RemoveNotification = '[Global Notification] Remove', RemoveAllNotification = '[Global Notification] Remove all' } export class AddNotification implements Action { readonly type = GlobalNotificationActionTypes.AddNotification; constructor(public payload: GlobalNotificationItemInterface) {} } export class RemoveNotification implements Action { readonly type = GlobalNotificationActionTypes.RemoveNotification; constructor(public id: GlobalNotificationId) {} } export class RemoveAllNotification implements Action { readonly type = GlobalNotificationActionTypes.RemoveAllNotification; constructor() {} } export type GlobalNotificationActions = AddNotification | RemoveNotification | RemoveAllNotification;