using Avalonia.Controls;
using Avalonia.Input;
using ClaudeDo.Ui.ViewModels.Modals;

namespace ClaudeDo.Ui.Views.Modals;

public partial class WorktreesOverviewModalView : Window
{
    public WorktreesOverviewModalView() => InitializeComponent();

    private void OnRowTapped(object? sender, TappedEventArgs e)
    {
        if (sender is Border { DataContext: WorktreeOverviewRowViewModel row } &&
            DataContext is WorktreesOverviewModalViewModel vm)
        {
            vm.SelectRow(row);
        }
    }


}
