using CommunityToolkit.Mvvm.Messaging;
using salesbook.Shared.Core.Entity;

namespace salesbook.Shared.Core.Messages.Notification.NewPush;

public class NewPushNotificationService
{
    public event Action<WtbNotification>? OnNotificationReceived;

    public NewPushNotificationService(IMessenger messenger)
    {
        messenger.Register<NewPushNotificationMessage>(this, (_, o) => { OnNotificationReceived?.Invoke(o.Value); });
    }
}