using CMSMicroservice.Domain.Events;
using Microsoft.Extensions.Logging;

namespace CMSMicroservice.Application.UserCartsCQ.EventHandlers;

public class DeleteUserCartsEventHandler : INotificationHandler<DeleteUserCartsEvent>
{
    private readonly ILogger<
        DeleteUserCartsEventHandler> _logger;

    public DeleteUserCartsEventHandler(ILogger<DeleteUserCartsEventHandler> logger)
    {
        _logger = logger;
    }

    public Task Handle(DeleteUserCartsEvent notification, CancellationToken cancellationToken)
    {
        _logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);

        return Task.CompletedTask;
    }
}
