using CommunityToolkit.Mvvm.ComponentModel; using HC_APTBS.Services; namespace HC_APTBS.ViewModels.Pages { /// /// ViewModel for the Dashboard navigation page. /// /// Thin façade — holds a reference so the Dashboard XAML /// can bind to MainViewModel-owned live readings, connection state, test summary, /// alarms, and commands via {Binding Root.X}. /// public sealed class DashboardPageViewModel : ObservableObject { /// Root ViewModel — owns services, live readings, and global commands. public MainViewModel Root { get; } /// Active alarm aggregator bound to the Dashboard alarm list. public DashboardAlarmsViewModel Alarms => Root.DashboardAlarms; /// Devices column ViewModel — CAN, K-Line, and Bench device tiles. public DashboardDevicesViewModel Devices { get; } public DashboardPageViewModel(MainViewModel root, ICanService can, IKwpService kwp) { Root = root; Devices = new DashboardDevicesViewModel(root, can, kwp); } } }