ios/BitwardenShared/UI/Platform/FileSelection/FileSelectionModule.swift
Eliot Williams 41d8e61a3b
BIT-1029: Never Lock, Events, & Routers (#401)
Co-authored-by: Jubie Alade <125899965+jubie-livefront@users.noreply.github.com>
Co-authored-by: Matt Czech <matt@livefront.com>
2024-01-31 15:43:53 -08:00

32 lines
1.0 KiB
Swift

// MARK: - FileSelectionModule
/// An object that builds coordinators for the file selection flow.
///
@MainActor
protocol FileSelectionModule {
/// Initializes a coordinator for navigating between `FileSelectionRoutes`s.
///
/// - Parameters
/// - delegate: The delegate for this coordinator.
/// - stackNavigator: The stack navigator that will be used to navigate between routes.
/// - Returns: A coordinator that can navigate to `FileSelectionRoutes`s.
///
func makeFileSelectionCoordinator(
delegate: FileSelectionDelegate,
stackNavigator: StackNavigator
) -> AnyCoordinator<FileSelectionRoute, Void>
}
extension DefaultAppModule: FileSelectionModule {
func makeFileSelectionCoordinator(
delegate: FileSelectionDelegate,
stackNavigator: StackNavigator
) -> AnyCoordinator<FileSelectionRoute, Void> {
FileSelectionCoordinator(
delegate: delegate,
services: services,
stackNavigator: stackNavigator
).asAnyCoordinator()
}
}