using NexusReader.Domain.Entities;

namespace NexusReader.Application.Abstractions.Persistence;

/// <summary>
/// Read-only abstraction for fetching concepts map data.
/// Defined in the Application layer to avoid a direct dependency on EF Core / NexusReader.Data.
/// </summary>
public interface IConceptsMapReadRepository
{
    /// <summary>
    /// Gets the last read page ID for the specified user.
    /// </summary>
    Task<string?> GetLastReadPageIdAsync(string userId, CancellationToken cancellationToken = default);

    /// <summary>
    /// Gets all knowledge units associated with a book, scoped by tenant.
    /// </summary>
    Task<List<KnowledgeUnit>> GetKnowledgeUnitsForBookAsync(
        Guid bookId,
        string tenantId,
        CancellationToken cancellationToken = default);
}
