using Mindforge.API.Models.Flashcards;

namespace Mindforge.API.Services.Interfaces
{
    public interface IFlashcardRepository
    {
        Task EnsureSchemaAsync();
        Task<FlashcardLibraryDetails> UpsertLibraryAsync(
            string filePath,
            string fileName,
            string subject,
            string difficulty,
            IReadOnlyList<FlashcardDraftCard> cards);
        Task<IReadOnlyList<FlashcardLibrarySummary>> GetLibrariesAsync();
        Task<FlashcardLibraryDetails?> GetLibraryByIdAsync(long libraryId);
        Task<IReadOnlyList<FlashcardCard>> GetCardsForLibrariesAsync(IReadOnlyList<long> libraryIds);
        Task<IReadOnlyList<FlashcardCardWithLibrary>> GetAllCardsWithLibraryAsync();
        Task RecordReviewAnswerAsync(long cardId, bool correct);
    }
}
