using ZB.MOM.WW.ScadaBridge.Commons.Messages.DebugView;

namespace ZB.MOM.WW.ScadaBridge.CentralUI.Services;

/// <summary>
/// Single-shot per-instance debug-snapshot client. A thin seam over the existing
/// <see cref="ZB.MOM.WW.ScadaBridge.Communication.CommunicationService.RequestDebugSnapshotAsync"/>
/// Ask so <see cref="AlarmSummaryService"/> can fan out snapshot fetches while
/// staying unit-testable (the implementation is substituted in tests).
/// </summary>
public interface IInstanceSnapshotClient
{
    /// <summary>
    /// Requests one debug snapshot for the given instance on the given site.
    /// </summary>
    /// <param name="siteIdentifier">The site's <c>SiteIdentifier</c> string (not the numeric site id).</param>
    /// <param name="instanceUniqueName">The instance's unique name.</param>
    /// <param name="cancellationToken">Cancellation token.</param>
    /// <returns>The instance's current debug snapshot, including its alarm states.</returns>
    Task<DebugViewSnapshot> GetSnapshotAsync(
        string siteIdentifier,
        string instanceUniqueName,
        CancellationToken cancellationToken = default);
}
