using System;
using PhotoRenamer.Base;
using PhotoRenamer.Logging.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;

namespace PhotoRenamer.Logging
{
    public class LoggingModule : IModule
    {
        private readonly IRegionManager _regionManager;

        public LoggingModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {

        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<ViewA>();
            _regionManager.RequestNavigate(RegionNames.LoggingRegion, new Uri(nameof(ViewA), UriKind.Relative));
        }
    }
}