//
//  DogPhotoListPresenter.swift
//  doglist
//
//  Created by Hélio Mesquita on 25/05/19.
//  Copyright (c) 2019 Hélio Mesquita. 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 DogPhotoListPresentationLogic {
  func presentTitle(_ text: String?)
  func reloadCollection()
  func presentRequestFailureAlert()
}

class DogPhotoListPresenter: DogPhotoListPresentationLogic {

  weak var viewController: DogPhotoListDisplayLogic?

  func presentTitle(_ text: String?) {
    viewController?.showTitle(R.string.dogPhoto.title(text ?? ""))
  }

  func reloadCollection() {
    viewController?.reloadCollection()
  }

  func presentRequestFailureAlert() {
    viewController?.showAlert(message: R.string.dogPhoto.request_failure())
  }
  
}
