using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using OF_DL.Models.Config; namespace OF_DL.Gui.ViewModels; public partial class CreatorConfigRowViewModel : ViewModelBase { private readonly Action _onDelete; private readonly Action _onEdit; [ObservableProperty] private string _username; [ObservableProperty] private CreatorConfig _config; public CreatorConfigRowViewModel(string username, CreatorConfig config, Action onDelete, Action onEdit) { _username = username; _config = config; _onDelete = onDelete; _onEdit = onEdit; } [RelayCommand] private void Delete() => _onDelete(this); [RelayCommand] private void Edit() => _onEdit(this); }