using NexusReader.Application.Queries.Graph;

namespace NexusReader.UI.Shared.Services;

public interface IKnowledgeGraphService
{
    GraphDataDto? CurrentGraphData { get; }
    string? ActiveNodeId { get; }
    bool IsLoading { get; }
    
    event Func<Task>? OnGraphUpdated;
    event Func<string, Task>? OnActiveNodeChanged;
    event Func<bool, Task>? OnLoadingChanged;

    Task UpdateGraph(GraphDataDto newData);
    Task SetActiveNode(string nodeId);
    Task SetLoading(bool isLoading);
    Task Clear();
}
