using CommunityToolkit.Mvvm.ComponentModel;

namespace ZB.MOM.WW.OtOpcUa.Client.UI.ViewModels;

/// <summary>
///     Represents a single active subscription row.
/// </summary>
public partial class SubscriptionItemViewModel : ObservableObject
{
    [ObservableProperty] private string? _status;

    [ObservableProperty] private string? _timestamp;

    [ObservableProperty] private string? _value;

    public SubscriptionItemViewModel(string nodeId, int intervalMs)
    {
        NodeId = nodeId;
        IntervalMs = intervalMs;
    }

    /// <summary>The monitored NodeId.</summary>
    public string NodeId { get; }

    /// <summary>The subscription interval in milliseconds.</summary>
    public int IntervalMs { get; }
}