using Avalonia.Controls.Notifications;
namespace AvaloniaSideBarEx.Services;

public class NotificationService: INotificationService
{
    public WindowNotificationManager? Manager { get; set; }

    public void Show(string title, string message, string type = "Info")
    {
        if (Manager is null) return;

        var notificationType = type switch
        {
            "Success" => NotificationType.Success,
            "Error" => NotificationType.Error,
            "Warning" => NotificationType.Warning,
            _ => NotificationType.Information
        };

        Manager.Show(new Notification(title, message, notificationType));
    }      
}