using System;
using System.Threading;
using System.Threading.Tasks;

namespace NexusReader.Application.Abstractions.Persistence;

/// <summary>
/// Decoupled database store to retrieve active user reading states and chapter content.
/// </summary>
public interface IUserReadingStateStore
{
    /// <summary>
    /// Retrieves the user's active reading state: last read ebook ID, last opened chapter/page ID, and tenant ID.
    /// </summary>
    Task<(Guid? EbookId, string? ChapterId, string? TenantId)> GetActiveReadingStateAsync(string userId, CancellationToken cancellationToken = default);

    /// <summary>
    /// Retrieves the text content of a specific chapter/page by its ID.
    /// </summary>
    Task<string?> GetChapterContentAsync(string chapterId, CancellationToken cancellationToken = default);
}
