using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using GSS2.UI.Core.Services; using GSS2.UI.Core.ViewModels; namespace GSS2.ViewModels; public partial class DeleteConfirmViewModel : ViewModelBase { public event EventHandler? Closes; private readonly NavigationService _navigation; [ObservableProperty] public partial string Question { get; set; } = ""; [ObservableProperty] public partial bool Result { get; set; } = false; public DeleteConfirmViewModel(NavigationService navigation) { _navigation = navigation; } [RelayCommand] private void Delete() { Result = true; Closes?.Invoke(this, Result); _navigation.NavigateBack(); } [RelayCommand] private void Close() { Result = false; Closes?.Invoke(this, Result); _navigation.NavigateBack(); } }