using CommunityToolkit.Mvvm.ComponentModel;

namespace ConeCalorimeter.ViewModels;

public sealed class NavigationItemViewModel : ObservableObject
{
    private bool _isSelected;

    public NavigationItemViewModel(string title, PageViewModel page)
    {
        Title = title;
        Page = page;
    }

    public NavigationItemViewModel(string title, Action action)
    {
        Title = title;
        Action = action;
    }

    public string Title { get; }

    public PageViewModel? Page { get; }

    public Action? Action { get; }

    public bool IsSelected
    {
        get => _isSelected;
        set => SetProperty(ref _isSelected, value);
    }
}
