using NexusReader.UI.Shared.Models;

namespace NexusReader.UI.Shared.Services;

public interface IReaderInteractionService
{
    event Func<string, Task>? OnNodeSelected;
    event Func<string, Task>? OnScrollToBlockRequested;
    event Func<string, Task>? OnHighlightBlockRequested;
    event Func<string, string, SelectionCoordinates, Task>? OnTextSelected;
    event Func<Task>? OnAssistantRequested;
    event Func<int, Task>? OnScrollPercentChanged;
    event Func<string, Task>? OnBlockReached;

    Task NotifyNodeSelected(string nodeId);
    Task RequestScrollToBlock(string blockId);
    Task RequestHighlightBlock(string blockId);
    Task NotifyTextSelected(string text, string blockId, SelectionCoordinates coords);
    Task RequestAssistant();
    Task NotifyScrollPercentChanged(int percent);
    Task NotifyBlockReached(string blockId);
}

