using System.Windows;
using System.Windows.Controls;
using NexusShell.ViewModels;

namespace NexusShell.Views;

public partial class NexusWindowsUnlockWindow : Window
{
    public NexusWindowsUnlockWindow()
    {
        InitializeComponent();
    }

    private void PinBox_OnPasswordChanged(object sender, RoutedEventArgs e)
    {
        if (DataContext is NexusWindowsUnlockViewModel vm && sender is PasswordBox box)
        {
            vm.SetPin(box.Password);
        }
    }
}
