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

namespace SharepointToolbox.Views.Tabs;

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

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