using ZB.MOM.WW.OtOpcUa.Commons.Types;

namespace ZB.MOM.WW.OtOpcUa.Commons.Interfaces;

/// <summary>Event arguments for role leader change notifications.</summary>
public sealed class RoleLeaderChangedEventArgs : EventArgs
{
    /// <summary>Gets the role name that changed leadership.</summary>
    public required string Role { get; init; }

    /// <summary>Gets the previous leader node ID, or null if there was no previous leader.</summary>
    public required NodeId? PreviousLeader { get; init; }

    /// <summary>Gets the new leader node ID, or null if the role is now leaderless.</summary>
    public required NodeId? NewLeader { get; init; }
}
