using Lattice.Core.Abstractions;
using Lattice.Core.Models;
using Lattice.Core.Models.Enums;
namespace Lattice.Core.Services;
///
/// Простая реализация сервиса уведомлений.
/// Хранит только событие и вызывает его при Show().
///
public sealed class NotificationService : INotificationService
{
public event EventHandler? NotificationReceived;
public void Show(string message, NotificationSeverity severity = NotificationSeverity.Info, int durationSeconds = 5)
{
NotificationReceived?.Invoke(this, new NotificationEventArgs(message, severity, durationSeconds));
}
}