import {Injectable} from "@angular/core";
import {MessageService} from 'primeng/api';

@Injectable({
    providedIn: 'root'
})
export class NlNotificationService {

    constructor(private messageService: MessageService) {
    }

    danger(content: string, style: "warning" | "error" = "error") {
        this.messageService.add({detail: content, severity: style})
    }

    success(content: string, style: "success" | "info" = "info") {
        this.messageService.add({detail: content, severity: style})
    }
}
