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

import UIKit

class ForecastCoordinator: Coordinator {
    //Private
    private let forecastViewModel = ForecastViewModel(locationManager: LocationManager.shared)
    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 forecastViewController = ForecastViewController(viewModel: forecastViewModel)
        navigationController.viewControllers = [forecastViewController]
        tabBarController?.add(viewController: navigationController)
    }
    
    func viewControllerDidEnd(controller: UIViewController) {
        //
    }
}
