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

namespace ClawdDotNet.Desktop.Views;

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

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