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

namespace CMSMicroservice.Application.UserCartsCQ.EventHandlers;

public class CreateNewUserCartsEventHandler : INotificationHandler<CreateNewUserCartsEvent>
{
    private readonly ILogger<
        CreateNewUserCartsEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
