//
//  TodayCoordinator.swift
//  1Weather
//
//  Created by Dmitry Stepanets on 08.02.2021.
//

import UIKit

class TodayCoordinator:Coordinator {
    //Private
    private let todayViewModel = TodayViewModel(locationManager: LocationManager.shared) // TODO: get rid of singleton maybe?
    private let navigationController = UINavigationController(nibName: nil, bundle: nil)
    private var tabBarController:UITabBarController?
    
    //Public
    var childCoordinators = [Coordinator]()
    var parentCoordinator: Coordinator?
    
    init(tabBarController:UITabBarController) {
        self.tabBarController = tabBarController
    }
    
    func start() {
        let todayViewController = TodayViewController(viewModel: todayViewModel)
        navigationController.viewControllers = [todayViewController]
        tabBarController?.add(viewController: navigationController)
    }
    
    func viewControllerDidEnd(controller: UIViewController) {
        //
    }
}
