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

namespace CMSMicroservice.Application.UserAddressCQ.EventHandlers;

public class SetAddressAsDefaultEventHandler : INotificationHandler<SetAddressAsDefaultEvent>
{
    private readonly ILogger<SetAddressAsDefaultEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
