using StammGenerator.Interface;
using System;

namespace StammGenerator.ViewModel
{
    internal class MainWindowNavigator : ObservableObject, IMainWindowNavigator
    {
        private BaseViewModel _currentViewModel = new BaseViewModel();
        public BaseViewModel CurrentViewModel
        {
            get => _currentViewModel;
            set
            {
                _currentViewModel?.Dispose();
                _currentViewModel = value;
                StateChanged?.Invoke();
            }
        }
        public event Action StateChanged;
    }
}
