using ZB.MOM.WW.MxGateway.Contracts.Proto;

namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;

/// <summary>
/// Fan-out point for MxEvents that should be mirrored to dashboard
/// SignalR clients subscribed to a session's events group. Implementations
/// must never throw — broadcast failures are best-effort and must not
/// disrupt the source gRPC stream.
/// </summary>
public interface IDashboardEventBroadcaster
{
    /// <summary>Publishes an MxEvent to all dashboard clients subscribed to the session.</summary>
    /// <param name="sessionId">The session identifier.</param>
    /// <param name="mxEvent">The MxEvent to publish.</param>
    void Publish(string sessionId, MxEvent mxEvent);
}
