2023-04-11 22:14:40 +00:00
|
|
|
//
|
|
|
|
// LocationsAddCoordinator.swift
|
|
|
|
// Locations
|
|
|
|
//
|
|
|
|
// Created by Javier Cicchelli on 11/04/2023.
|
|
|
|
// Copyright © 2023 Röck+Cöde. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Core
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
class LocationsAddCoordinator: Coordinator {
|
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
|
|
|
var children: [Coordinator] = []
|
|
|
|
var router: Router
|
|
|
|
|
|
|
|
// MARK: Initialisers
|
|
|
|
|
|
|
|
init(router: Router) {
|
|
|
|
self.router = router
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: Coordinator
|
|
|
|
|
|
|
|
func present(animated: Bool, onDismiss: (() -> Void)?) {
|
|
|
|
router.present(
|
|
|
|
LocationsAddViewController(
|
|
|
|
viewModel: LocationsAddViewModel(coordinator: self)
|
|
|
|
),
|
|
|
|
animated: animated,
|
|
|
|
onDismiss: onDismiss
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: - LocationsAddCoordination
|
|
|
|
|
2023-04-12 21:25:08 +00:00
|
|
|
extension LocationsAddCoordinator: LocationsAddCoordination {
|
|
|
|
|
|
|
|
// MARK: Functions
|
|
|
|
|
2023-04-12 23:07:42 +00:00
|
|
|
func closeLocationsAddScreen() {
|
2023-04-12 21:25:08 +00:00
|
|
|
router.dismiss(animated: true)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|