using System.Windows.Input;
using CommunityToolkit.Mvvm.ComponentModel;

namespace ConeCalorimeter.ViewModels;

public sealed class DeviceActionViewModel : ObservableObject
{
    private string _displayText;

    public DeviceActionViewModel(string label, ICommand command)
    {
        Label = label;
        Command = command;
        _displayText = label;
    }

    public string Label { get; }

    public string DisplayText
    {
        get => _displayText;
        private set => SetProperty(ref _displayText, value);
    }

    public ICommand Command { get; }

    public void SetDisplayText(string displayText)
    {
        DisplayText = displayText;
    }
}
