diff --git a/Apps/Locations/Libraries/Sources/Core/Routers/WindowRouter.swift b/Apps/Locations/Libraries/Sources/Core/Routers/WindowRouter.swift new file mode 100644 index 0000000..6cbe31b --- /dev/null +++ b/Apps/Locations/Libraries/Sources/Core/Routers/WindowRouter.swift @@ -0,0 +1,39 @@ +// +// WindowRouter.swift +// Core +// +// Created by Javier Cicchelli on 11/04/2023. +// Copyright © 2023 Röck+Cöde. All rights reserved. +// + +import UIKit + +public class WindowRouter: Router { + + // MARK: Properties + + private let window: UIWindow? + + // MARK: Initialisers + + public init(window: UIWindow?) { + self.window = window + } + + // MARK: Functions + + public func present( + _ viewController: UIViewController, + animated: Bool, + onDismiss: OnDismissedClosure? + ) { + window?.rootViewController = viewController + + window?.makeKeyAndVisible() + } + + public func dismiss(animated: Bool) { + // Nothing to do here... + } + +}