//
//  NewsFeedNewsFeedConfigurator.swift
//  RSS Reader
//
//  Created by Artem on 31/05/2019.
//  Copyright © 2019 Artem Lebedko. All rights reserved.
//

import UIKit

class NewsFeedModuleConfigurator {

    func configureModuleForViewInput<UIViewController>(viewInput: UIViewController) {

        if let viewController = viewInput as? NewsFeedViewController {
            configure(viewController: viewController)
        }
    }

    private func configure(viewController: NewsFeedViewController) {
        let router = NewsFeedRouter()

        let presenter = NewsFeedPresenter()
        presenter.view = viewController
        presenter.router = router

        let interactor = NewsFeedInteractor()
        interactor.output = presenter

        presenter.interactor = interactor
        viewController.output = presenter
    }
}
