using Avalonia.Layout; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using System.Collections.ObjectModel; namespace InABox.Avalonia.Dialogs; public partial class OptionDialogViewModel : BasePopupViewModel, IAlignedPopup { [ObservableProperty] private string _title = "Select Option"; [ObservableProperty] private ObservableCollection _options = new(); public HorizontalAlignment HorizontalAlignment => HorizontalAlignment.Stretch; public VerticalAlignment VerticalAlignment => VerticalAlignment.Center; [RelayCommand] private void Cancel() => Close(null); [RelayCommand] private void Select(string option) => Close(option); }