using Avalonia.Controls;
using ClawdDotNet.Desktop.ViewModels;

namespace ClawdDotNet.Desktop.Views;

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

    protected override void OnDataContextChanged(EventArgs e)
    {
        base.OnDataContextChanged(e);
        if (DataContext is AddAgentViewModel vm)
        {
            vm.CloseRequested += () => Close();
        }
    }
}
