using ZB.MOM.WW.OtOpcUa.Core.Abstractions;

namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Runtime;

/// <summary>
///     Test seam for the gateway-side Acknowledge call. Production wraps the
///     <c>MxGatewayClient.AcknowledgeAlarmAsync</c> RPC; tests substitute a fake
///     so <see cref="GalaxyDriver.AcknowledgeAsync"/> can be exercised without a
///     running gateway.
/// </summary>
internal interface IGalaxyAlarmAcknowledger
{
    /// <summary>
    ///     Forward a single alarm acknowledgement to the gateway. The gateway
    ///     translates this to an MxAccess Acknowledge call against the worker's
    ///     session and returns the native MxStatus on the reply.
    /// </summary>
    /// <param name="alarmFullReference">
    ///     Fully-qualified alarm reference (e.g. <c>"Tank01.Level.HiHi"</c>).
    /// </param>
    /// <param name="comment">Operator-supplied comment forwarded to MxAccess.</param>
    /// <param name="operatorUser">
    ///     Operator principal performing the acknowledgement. Resolved from the
    ///     OPC UA session by the server-side ACL layer before reaching the driver.
    /// </param>
    /// <param name="cancellationToken">Cancels the gateway RPC.</param>
    /// <returns>A task that represents the asynchronous operation.</returns>
    Task AcknowledgeAsync(
        string alarmFullReference,
        string comment,
        string operatorUser,
        CancellationToken cancellationToken);
}
