using ColaFlow.Modules.ProjectManagement.Application.Services;

namespace ColaFlow.API.Services;

/// <summary>
/// Adapter that implements IProjectNotificationService by delegating to IRealtimeNotificationService
/// This allows the ProjectManagement module to send notifications without depending on the API layer
/// </summary>
public class ProjectNotificationServiceAdapter : IProjectNotificationService
{
    private readonly IRealtimeNotificationService _realtimeService;

    public ProjectNotificationServiceAdapter(IRealtimeNotificationService realtimeService)
    {
        _realtimeService = realtimeService;
    }

    public Task NotifyProjectCreated(Guid tenantId, Guid projectId, object project)
    {
        return _realtimeService.NotifyProjectCreated(tenantId, projectId, project);
    }

    public Task NotifyProjectUpdated(Guid tenantId, Guid projectId, object project)
    {
        return _realtimeService.NotifyProjectUpdated(tenantId, projectId, project);
    }

    public Task NotifyProjectArchived(Guid tenantId, Guid projectId)
    {
        return _realtimeService.NotifyProjectArchived(tenantId, projectId);
    }
}
