using System.Windows.Controls;
using NavisworksTransport.UI.WPF.ViewModels;

namespace NavisworksTransport.UI.WPF.Views
{
    /// <summary>
    /// BatchTaskManagementView.xaml 的交互逻辑
    /// 批处理任务管理页签视图，提供任务创建、执行、监控和报告查看功能
    /// </summary>
    public partial class BatchTaskManagementView : UserControl
    {
        /// <summary>
        /// 批处理任务管理视图模型
        /// </summary>
        public BatchTaskManagementViewModel ViewModel { get; private set; }

        public BatchTaskManagementView()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 带主ViewModel参数的构造函数，支持统一状态栏
        /// </summary>
        /// <param name="mainViewModel">主ViewModel，用于统一状态栏</param>
        public BatchTaskManagementView(LogisticsControlViewModel mainViewModel)
        {
            InitializeComponent();
            InitializeViewModel(mainViewModel);
        }

        /// <summary>
        /// 初始化ViewModel（支持统一状态栏）
        /// </summary>
        /// <param name="mainViewModel">主ViewModel，用于统一状态栏</param>
        private void InitializeViewModel(LogisticsControlViewModel mainViewModel)
        {
            ViewModel = new BatchTaskManagementViewModel();
            DataContext = ViewModel;
        }
    }
}