mirror of
https://github.com/bitwarden/ios.git
synced 2026-06-19 13:08:28 -05:00
35 lines
1.1 KiB
Swift
35 lines
1.1 KiB
Swift
import BitwardenKit
|
|
|
|
// MARK: - Generator Module
|
|
|
|
/// An object that builds coordinators for the generator tab.
|
|
///
|
|
@MainActor
|
|
protocol GeneratorModule {
|
|
/// Initializes a coordinator for navigating between `GeneratorRoute`s.
|
|
///
|
|
/// - Parameters:
|
|
/// - delegate: An optional delegate for the coordinator.
|
|
/// - stackNavigator: The stack navigator that will be used to navigate between routes.
|
|
/// - Returns: A coordinator that can navigate to `GeneratorRoute`s.
|
|
///
|
|
func makeGeneratorCoordinator(
|
|
delegate: GeneratorCoordinatorDelegate?,
|
|
stackNavigator: StackNavigator,
|
|
) -> AnyCoordinator<GeneratorRoute, Void>
|
|
}
|
|
|
|
extension DefaultAppModule: GeneratorModule {
|
|
func makeGeneratorCoordinator(
|
|
delegate: GeneratorCoordinatorDelegate?,
|
|
stackNavigator: StackNavigator,
|
|
) -> AnyCoordinator<GeneratorRoute, Void> {
|
|
GeneratorCoordinator(
|
|
delegate: delegate,
|
|
module: self,
|
|
services: services,
|
|
stackNavigator: stackNavigator,
|
|
).asAnyCoordinator()
|
|
}
|
|
}
|