using FluentResults;
using NexusReader.Application.Queries.Reader;

namespace NexusReader.Application.Abstractions.Services;

/// <summary>
/// Reads and parses EPUB content for a specific ebook and chapter.
/// </summary>
public interface IEpubReader
{
    /// <summary>
    /// Retrieves the content blocks for a given chapter of the specified ebook.
    /// </summary>
    /// <param name="ebookId">The unique ID of the ebook to read.</param>
    /// <param name="chapterIndex">Zero-based chapter index.</param>
    /// <param name="userId">The authenticated user's ID (used for tenant isolation in the DB lookup).</param>
    /// <param name="cancellationToken">Cancellation token.</param>
    Task<Result<ReaderPageViewModel>> GetEpubContentAsync(
        Guid ebookId,
        int chapterIndex,
        string? userId = null,
        CancellationToken cancellationToken = default);
}
