using UtopiaCanteenSystem.ViewModels;
using UtopiaCanteenSystem.Services.Logging;
namespace UtopiaCanteenSystem.Services;
///
/// Holds the current view model and notifies when it changes for binding in MainWindow.
///
public class NavigationService : INavigationService
{
private object? _currentViewModel;
private DateTime? _dashboardSessionStartUtc;
private readonly AppSession _session;
public object? CurrentViewModel
{
get => _currentViewModel;
private set
{
if (_currentViewModel == value) return;
_currentViewModel = value;
CurrentViewModelChanged?.Invoke(this, EventArgs.Empty);
}
}
public event EventHandler? CurrentViewModelChanged;
private readonly Func _adminLoginVm;
private readonly Func _scannerVm;
private readonly Func _dashboardVm;
private readonly Func _adminSettingsAuthVm;
private readonly Func