//
//  SettingsModeFollowerRouter.swift
//  xDrip
//
//  Created by Artem Kalmykov on 09.04.2020.
//  Copyright (c) 2020 Faifly. All rights reserved.
//
//  This file was generated by the Clean Swift Xcode Templates so
//  you can apply clean architecture to your iOS and Mac projects,
//  see http://clean-swift.com
//

import UIKit

protocol SettingsModeFollowerRoutingLogic {
    func showConnectionTestingAlert()
    func finishConnectionTestingAlert(message: String, icon: UIImage)
}

protocol SettingsModeFollowerDataPassing {
    var dataStore: SettingsModeFollowerDataStore? { get }
}

final class SettingsModeFollowerRouter: SettingsModeFollowerRoutingLogic, SettingsModeFollowerDataPassing {
    weak var viewController: SettingsModeFollowerViewController?
    weak var dataStore: SettingsModeFollowerDataStore?
    
    // MARK: Routing
    
    private weak var popUpController: PopUpViewController?
    
    func showConnectionTestingAlert() {
        let popUpController = PopUpViewController()
        viewController?.present(popUpController, animated: true, completion: nil)
        self.popUpController = popUpController
    }
    
    func finishConnectionTestingAlert(message: String, icon: UIImage) {
        popUpController?.presentFinishAlert(message: message, icon: icon)
    }
}
