import { NotificationActions , NotificationActionTypes } from "./actions" ; /**
 * Notification type
 */ export enum NotificationType { SUCCESS = "SUCCESS" , ERROR = "ERROR" } /**
 * Notification data
 */ export interface NotificationData { type : NotificationType ; message : string ; } /**
 * Notification state
 */ export interface NotificationState { data ? : NotificationData ; show : boolean ; } param state param action export function notification ( state = { show : false } , action ) { switch ( action . type ) { case NotificationActionTypes . DISPLAY : return { data : action . data , show : true } ; case NotificationActionTypes . DISMISS : return { ... state , show : false } ; default : return state ; } }