//
//  PreparationPreparationInitializer.swift
//  RSS-Reader
//
//  Created by Artem on 11/11/2019.
//  Copyright © 2019 Artem. All rights reserved.
//

import UIKit

class PreparationModuleInitializer: NSObject {

    //Connect with object on storyboard
    @IBOutlet weak var preparationViewController: PreparationViewController!

    
    override func awakeFromNib() {

        let configurator = PreparationModuleConfigurator()
        configurator.configureModuleForViewInput(viewInput: preparationViewController)
    }
    
    
    convenience init(window: UIWindow?) {
        self.init()
        
        let sb = UIStoryboard(name: "Preparation", bundle: nil)
        preparationViewController = sb.instantiateViewController(withIdentifier: "PreparationViewController") as? PreparationViewController
        
        let configurator = NewsFeedModuleConfigurator()
        configurator.configureModuleForViewInput(viewInput: preparationViewController)
        
        window?.rootViewController = UINavigationController(rootViewController: preparationViewController)
        window?.makeKeyAndVisible()
    }
}
