You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

6 years ago
6 years ago
  1. //
  2. // KycForm1Presenter.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 12/09/2018.
  6. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class KycForm1Presenter {
  10. // MARK: Properties
  11. weak var view: KycForm1ViewInterface?
  12. var interactor: KycForm1InteractorInput?
  13. var wireframe: KycForm1WireframeInput?
  14. // MARK: Converting entities
  15. }
  16. // MARK: KycForm1 module interface
  17. extension KycForm1Presenter: KycForm1ModuleInterface {
  18. func validate(model: KycForm1Model) {
  19. self.interactor?.validate(model: model)
  20. }
  21. }
  22. // MARK: KycForm1 interactor output interface
  23. extension KycForm1Presenter: KycForm1InteractorOutput {
  24. func show(errorsDick: (doesNotSucks: Bool, errorsDick: [String : String])) {
  25. self.view?.show(result: errorsDick)
  26. }
  27. func viewIsReady() {
  28. self.view?.showLoading()
  29. self.interactor?.viewIsReady()
  30. }
  31. func show(error: Error) {
  32. self.view?.hideLoading()
  33. self.view?.show(error: error.localizedDescription)
  34. }
  35. func show(model: KycModel) {
  36. self.view?.hideLoading()
  37. self.view?.show(model: model)
  38. }
  39. }