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

namespace NavisworksTransport.UI.WPF.Views
{
    /// <summary>
    /// SystemManagementView.xaml 的交互逻辑
    /// 系统管理页签视图，提供日志管理、插件设置、系统信息和性能监控功能
    /// </summary>
    public partial class SystemManagementView : UserControl
    {
        /// <summary>
        /// 系统管理视图模型
        /// </summary>
        public SystemManagementViewModel ViewModel { get; private set; }

        public SystemManagementView()
        {
            InitializeComponent();
        }

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

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