using System; using System.Collections.Generic; using System.Threading.Tasks; using System.Windows.Input; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Ursa.Controls; namespace Ursa.Demo.ViewModels; public partial class PinCodeDemoViewModel: ObservableObject { public ICommand CompleteCommand { get; set; } [ObservableProperty] private List? _error; public PinCodeDemoViewModel() { CompleteCommand = new AsyncRelayCommand>(OnComplete); Error = [new Exception("Invalid verification code")]; } private async Task OnComplete(IList? obj) { if (obj is null) return; var code = string.Join("", obj); await MessageBox.ShowOverlayAsync(code); } }