using System.Windows.Controls;
using SharepointToolbox.Views.Dialogs;

namespace SharepointToolbox.Views.Tabs;

public partial class BulkSitesView : UserControl
{
    public BulkSitesView(ViewModels.Tabs.BulkSitesViewModel viewModel)
    {
        InitializeComponent();
        DataContext = viewModel;

        viewModel.ShowConfirmDialog = message =>
        {
            var dlg = new ConfirmBulkOperationDialog(message)
                { Owner = System.Windows.Window.GetWindow(this) };
            dlg.ShowDialog();
            return dlg.IsConfirmed;
        };
    }
}
