using DeepDrftModels.Enums;

namespace DeepDrftPublic.Client.Services;

/// <summary>
/// The emit seam for the <see cref="PlayTracker"/> (Phase 16 §2.1). The tracker owns the session
/// lifecycle, the engagement floor, and the bucket classification but knows nothing about transport —
/// it hands a finished classification to a sink. The production sink fires a <c>sendBeacon</c> POST to
/// <c>api/event/play</c>; tests substitute a fake sink to assert floor and bucket behaviour with no
/// JS interop. This keeps the tracker's logic testable behind one seam, as the spec calls for.
/// </summary>
public interface IPlayEventSink
{
    /// <summary>Emit one recorded play. Called at most once per session, only when the floor is crossed.</summary>
    void EmitPlay(string trackEntryKey, PlayBucket bucket);
}
