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

namespace ClawdDotNet.Desktop.Views;

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

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