import { NotificationService } from "./NotificationService"; // @ts-ignore import * as alertify from "alertifyjs"; export class AlertifyNotificationService implements NotificationService { private readonly _alertify = alertify; constructor() { this._alertify.set('notifier', 'position', 'top-center'); } success(message: string): void { this._alertify.success(message) } error(message: string): void { this._alertify.error(message); } errorWithDelay(message: string, delay: number): void { const _delay = this._alertify.get('notifier', 'delay'); this._alertify.set('notifier', 'delay', delay); this._alertify.error(message); this._alertify.set('notifier', 'delay', _delay); } warning(message: string): void { this._alertify.warning(message); } message(message: string): void { this._alertify.message(message); } }