using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using NexusReader.Application.Queries.Recommendations;

namespace NexusReader.UI.Shared.Services;

/// <summary>
/// Provides contextual book recommendations based on the user's active reading state.
/// Abstracts the HTTP transport layer from Blazor UI components.
/// </summary>
public interface IRecommendationService
{
    /// <summary>
    /// Fetches contextual recommendations for the authenticated user.
    /// </summary>
    /// <param name="cancellationToken">A token to cancel the operation.</param>
    /// <returns>
    /// A list of <see cref="RecommendationDto"/> on success, or an empty list when none are available.
    /// Returns <c>null</c> if the request fails due to a transport or server error.
    /// </returns>
    Task<List<RecommendationDto>?> GetRecommendationsAsync(CancellationToken cancellationToken = default);
}
