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.
56 lines
1.8 KiB
56 lines
1.8 KiB
//
|
|
// NotificationListWireframe.swift
|
|
// GME Remit
|
|
//
|
|
// Created by yare on 8/15/22.
|
|
//Copyright © 2022 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class NotificationListWireframe {
|
|
weak var view: UIViewController!
|
|
lazy var notificationDetailWireframe: NotificationDetailWireframe = { NotificationDetailWireframe() }()
|
|
}
|
|
|
|
extension NotificationListWireframe: NotificationListWireframeInput {
|
|
|
|
var storyboardName: String {return "NotificationList"}
|
|
|
|
func getMainView() -> UIViewController {
|
|
let service = NotificationListService()
|
|
let interactor = NotificationListInteractor(service: service)
|
|
let presenter = NotificationListPresenter()
|
|
let viewController = viewControllerFromStoryboard(of: NotificationListViewController.self)
|
|
|
|
viewController.presenter = presenter
|
|
interactor.output = presenter
|
|
presenter.interactor = interactor
|
|
presenter.wireframe = self
|
|
presenter.view = viewController
|
|
|
|
self.view = viewController
|
|
return viewController
|
|
}
|
|
|
|
func push(overseasType: OverseasType = .outbound, in source: UINavigationController) {
|
|
self.pushMainView(in: source)
|
|
}
|
|
|
|
func open(on viewController: UIViewController?) {
|
|
let vc = getMainView()
|
|
let naviVC = UINavigationController(rootViewController: vc)
|
|
|
|
if let navVC = viewController?.navigationController {
|
|
navVC.present(naviVC, animated: true)
|
|
} else {
|
|
viewController?.present(naviVC, animated: true)
|
|
}
|
|
}
|
|
|
|
func openNotificationDetails() {
|
|
if let navVC = view.navigationController {
|
|
navVC.push(notificationDetailWireframe.getMainView(), animated: true)
|
|
}
|
|
}
|
|
}
|