export class NotificationItem { public _animatedIn: boolean; public _animatedOut: boolean; public title: string; public message:string; public timeout: number = 5000; public animationIn: 'bounceInLeft'; public animationOut: 'bounceOutLeft'; public isshow: boolean; constructor(title: string, message: string) { this.title = title; this.message = message; } show() { this.isshow = true; this._animatedIn = true; setTimeout(() => this._animatedIn = false,5000); } hide() { this.isshow = false; this._animatedOut = true; setTimeout(() => this._animatedOut = false,500); } get class(): string[] { let list: string[] = []; if(this.show) { list.push('show'); if(this._animatedIn && this.animationIn) { list.push(this.animationIn); list.push('animated'); } else if(this._animatedOut && this.animationOut) { list.push(this.animationOut); list.push('animated'); } } return list; } }