using CommunityToolkit.Mvvm.Messaging;
using salesbook.Shared.Core.Dto.Activity;

namespace salesbook.Shared.Core.Messages.Activity.Copy;

public class CopyActivityService
{
    public event Action<ActivityDTO>? OnCopyActivity;
    
    public CopyActivityService(IMessenger messenger)
    {
        messenger.Register<CopyActivityMessage>(this, (_, o) =>
        {
            OnCopyActivity?.Invoke(o.Value);
        });
    }
}