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

/// <summary>
///     Event data raised when the client connection state changes.
/// </summary>
public sealed class ConnectionStateChangedEventArgs : EventArgs
{
    /// <summary>Initializes a new instance of the ConnectionStateChangedEventArgs class.</summary>
    /// <param name="oldState">The previous connection state.</param>
    /// <param name="newState">The new connection state.</param>
    /// <param name="endpointUrl">The endpoint URL associated with the state change.</param>
    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; }
}