using NexusReader.Application.Queries.Quiz;

namespace NexusReader.UI.Shared.Services;

public interface IQuizStateService
{
    string? CurrentQuizBlockId { get; }
    QuizDto? CurrentQuiz { get; }
    bool IsHydrating { get; }
    bool HasNewQuiz { get; }
    
    event Func<string, Task>? OnQuizRequested;
    event Func<Task>? OnQuizUpdated;
    
    Task RequestQuiz(string blockId);
    Task SetQuiz(string? blockId, QuizDto? quiz);
    Task SetHydrating(bool hydrating);
    Task MarkQuizAsSeen();
}
