using CommunityToolkit.Mvvm.Messaging;

namespace salesbook.Shared.Core.Messages.Back;

public class BackNavigationService
{
    public event Action? OnHardwareBack;

    public BackNavigationService(IMessenger messenger)
    {
        messenger.Register<HardwareBackMessage>(this, (_, _) =>
        {
            OnHardwareBack?.Invoke();
        });
    }
}
