using Predictalytics.Application.DTOs;
using Predictalytics.Domain.Entities;

namespace Predictalytics.Application.Interfaces;

public interface IAlertService
{
    /// <summary>Evaluate alert rules against recent activity and create alerts as needed.</summary>
    Task EvaluateAlertsAsync(CancellationToken ct = default);

    /// <summary>Create a custom alert.</summary>
    Task CreateAlertAsync(Alert alert, CancellationToken ct = default);

    /// <summary>Get recent alerts.</summary>
    Task<IReadOnlyList<AlertDto>> GetRecentAlertsAsync(int count = 50, bool unreadOnly = false, CancellationToken ct = default);

    /// <summary>Mark an alert as read.</summary>
    Task MarkAsReadAsync(int alertId, CancellationToken ct = default);
}
