namespace VigilCare.Simulation;

public interface IReplayObserver
{
    void Header(string name, string? description);
    void Info(string message);
    void Event(string simTime, string description);
    void Waiting(double deltaMinutes, int delayMs);
    void Warn(string message);
    void Error(string message);
    void DryRun(string message);
    void Completed(ReplayResult result);

    /// <summary>Fired after each cluster so hosts can report progress.</summary>
    void Progress(double offsetMinutes, int clusterIndex, int clusterCount);
}

public sealed class NullReplayObserver : IReplayObserver
{
    public static readonly NullReplayObserver Instance = new();

    public void Header(string name, string? description) { }
    public void Info(string message) { }
    public void Event(string simTime, string description) { }
    public void Waiting(double deltaMinutes, int delayMs) { }
    public void Warn(string message) { }
    public void Error(string message) { }
    public void DryRun(string message) { }
    public void Completed(ReplayResult result) { }
    public void Progress(double offsetMinutes, int clusterIndex, int clusterCount) { }
}
