using CommunityToolkit.Mvvm.ComponentModel;

namespace OF_DL.Gui.ViewModels;

public partial class SelectableUserViewModel(string username, long userId) : ViewModelBase
{
    public string Username { get; } = username;

    public long UserId { get; } = userId;

    public event EventHandler? SelectionChanged;

    [ObservableProperty]
    private bool _isSelected;

    partial void OnIsSelectedChanged(bool value)
    {
        SelectionChanged?.Invoke(this, EventArgs.Empty);
    }
}
