namespace ZB.MOM.WW.OtOpcUa.Client.Shared.Models;

/// <summary>
///     Event data raised when the client connection state changes.
/// </summary>
public sealed class ConnectionStateChangedEventArgs : EventArgs
{
    public ConnectionStateChangedEventArgs(ConnectionState oldState, ConnectionState newState, string endpointUrl)
    {
        OldState = oldState;
        NewState = newState;
        EndpointUrl = endpointUrl;
    }

    /// <summary>The previous connection state.</summary>
    public ConnectionState OldState { get; }

    /// <summary>The new connection state.</summary>
    public ConnectionState NewState { get; }

    /// <summary>The endpoint URL associated with the state change.</summary>
    public string EndpointUrl { get; }
}