using ErsatzTV.Core.Troubleshooting;

namespace ErsatzTV.Core.Interfaces.Troubleshooting;

// Records the outcome of the most recent troubleshooting playback session so the SPA can poll
// for completion (the legacy Blazor page instead subscribed to an in-process notification). The
// store is reset when a new session starts (see PrepareTroubleshootingPlaybackHandler) and written
// by the PlaybackTroubleshootingCompletedNotification handler.
public interface ITroubleshootingPlaybackStatusStore
{
    Option<TroubleshootingPlaybackResult> CurrentResult { get; }

    void Reset();

    void RecordCompletion(int exitCode, Option<double> speed);
}
