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

namespace CMSMicroservice.Application.ProductImagesCQ.EventHandlers;

public class UpdateProductImagesEventHandler : INotificationHandler<UpdateProductImagesEvent>
{
    private readonly ILogger<
        UpdateProductImagesEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
