using Avalonia.Controls;
using Avalonia.Input;

namespace ClaudeDo.Ui.Views.Modals;

public partial class UnfinishedPlanningModalView : Window
{
    public UnfinishedPlanningModalView()
    {
        InitializeComponent();
        DataContextChanged += (_, _) =>
        {
            if (DataContext is ViewModels.Modals.UnfinishedPlanningModalViewModel vm)
                vm.CloseAction = () => Close();
        };
    }

    private void TitleBar_PointerPressed(object? sender, PointerPressedEventArgs e)
    {
        if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
            BeginMoveDrag(e);
    }
}
