using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;

namespace ZB.MOM.WW.ScadaBridge.Commons.Types.Alarms;

/// <summary>
/// Unified, read-only alarm condition state. The OPC UA Part 9 sub-conditions
/// are orthogonal, and MxAccess's ACTIVE / ACTIVE_ACKED / INACTIVE map cleanly
/// onto them, so they are modeled as independent flags plus a 0–1000 severity.
/// Computed alarms populate this from State + Priority; native alarms mirror it
/// from the source.
/// </summary>
/// <param name="Active">Active vs Inactive.</param>
/// <param name="Acknowledged">Acked vs Unacked.</param>
/// <param name="Confirmed">Confirmed vs Unconfirmed; null when the condition is not confirmable.</param>
/// <param name="Shelve">Shelving sub-state.</param>
/// <param name="Suppressed">Whether the source has suppressed the condition.</param>
/// <param name="Severity">Severity on the unified 0–1000 scale.</param>
public record AlarmConditionState(
    bool Active,
    bool Acknowledged,
    bool? Confirmed,
    AlarmShelveState Shelve,
    bool Suppressed,
    int Severity);
