218 lines
10 KiB
Swift
218 lines
10 KiB
Swift
// swiftlint:disable all
|
|
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
|
|
|
|
// swiftlint:disable sorted_imports
|
|
import Foundation
|
|
import UIKit
|
|
|
|
// swiftlint:disable superfluous_disable_command
|
|
// swiftlint:disable file_length implicit_return
|
|
|
|
// MARK: - Storyboard Scenes
|
|
|
|
// swiftlint:disable explicit_type_interface identifier_name line_length type_body_length type_name
|
|
internal enum StoryboardScene {
|
|
internal enum Account: StoryboardType {
|
|
internal static let storyboardName = "Account"
|
|
|
|
internal static let accountControllerOnboardingOverview = SceneType<AccountControllerTutorial>(storyboard: Account.self, identifier: "AccountControllerOnboardingOverview")
|
|
|
|
internal static let accountControllerPin = SceneType<AccountControllerPin>(storyboard: Account.self, identifier: "AccountControllerPin")
|
|
|
|
internal static let changeKey = SceneType<AccountControllerChangeKey>(storyboard: Account.self, identifier: "changeKey")
|
|
|
|
internal static let confirmChangeKey = SceneType<AccountControllerConfirmChangeKey>(storyboard: Account.self, identifier: "confirmChangeKey")
|
|
|
|
internal static let connect = SceneType<AccountControllerConnect>(storyboard: Account.self, identifier: "connect")
|
|
|
|
internal static let manual = SceneType<AccountControllerManual>(storyboard: Account.self, identifier: "manual")
|
|
|
|
internal static let onboarding = SceneType<AccountControllerOnboarding>(storyboard: Account.self, identifier: "onboarding")
|
|
}
|
|
internal enum AccountOnboarding: StoryboardType {
|
|
internal static let storyboardName = "AccountOnboarding"
|
|
|
|
internal static let accountOnboardingControllerInterfaceType = SceneType<AccountOnboardingControllerInterfaceType>(storyboard: AccountOnboarding.self, identifier: "AccountOnboardingControllerInterfaceType")
|
|
|
|
internal static let accountOnboardingControllerSimpleUsername = SceneType<AccountOnboardingControllerSimpleUsername>(storyboard: AccountOnboarding.self, identifier: "AccountOnboardingControllerSimpleUsername")
|
|
|
|
internal static let accountOnboardingControllerSimpleUsernameSaveKey = SceneType<AccountOnboardingControllerSimpleUsernameSaveKey>(storyboard: AccountOnboarding.self, identifier: "AccountOnboardingControllerSimpleUsernameSaveKey")
|
|
|
|
internal static let accountOnboardingControllerStartWayNavigation = SceneType<UIKit.UINavigationController>(storyboard: AccountOnboarding.self, identifier: "AccountOnboardingControllerStartWayNavigation")
|
|
|
|
internal static let accountOnboardingControllerTutorial = SceneType<AccountOnboardingControllerTutorial>(storyboard: AccountOnboarding.self, identifier: "AccountOnboardingControllerTutorial")
|
|
}
|
|
internal enum Apartments: StoryboardType {
|
|
internal static let storyboardName = "Apartments"
|
|
|
|
internal static let request = SceneType<ApartmentsControllerRequest>(storyboard: Apartments.self, identifier: "request")
|
|
}
|
|
internal enum Cccp: StoryboardType {
|
|
internal static let storyboardName = "CCCP"
|
|
|
|
internal static let initialScene = InitialSceneType<UIKit.UINavigationController>(storyboard: Cccp.self)
|
|
|
|
internal static let cccpControllerCreateExchangeRequest = SceneType<CCCPControllerCreateExchangeRequest>(storyboard: Cccp.self, identifier: "CCCPControllerCreateExchangeRequest")
|
|
|
|
internal static let cccpControllerDestroyTokens = SceneType<CCCPControllerDestroyTokens>(storyboard: Cccp.self, identifier: "CCCPControllerDestroyTokens")
|
|
|
|
internal static let cccpControllerGenerateTokens = SceneType<CCCPControllerGenerateTokens>(storyboard: Cccp.self, identifier: "CCCPControllerGenerateTokens")
|
|
|
|
internal static let cccpControllerPriority = SceneType<CCCPControllerPriority>(storyboard: Cccp.self, identifier: "CCCPControllerPriority")
|
|
|
|
internal static let menu = SceneType<CCCPMainViewController>(storyboard: Cccp.self, identifier: "menu")
|
|
}
|
|
internal enum Cards: StoryboardType {
|
|
internal static let storyboardName = "Cards"
|
|
|
|
internal static let initialScene = InitialSceneType<CardsController>(storyboard: Cards.self)
|
|
|
|
internal static let card = SceneType<CardsControllerCard>(storyboard: Cards.self, identifier: "card")
|
|
|
|
internal static let initial = SceneType<CardsController>(storyboard: Cards.self, identifier: "initial")
|
|
|
|
internal static let scanCard = SceneType<CardsScanViewController>(storyboard: Cards.self, identifier: "scan_card")
|
|
}
|
|
internal enum CryptoChat: StoryboardType {
|
|
internal static let storyboardName = "CryptoChat"
|
|
|
|
internal static let initialScene = InitialSceneType<UIKit.UINavigationController>(storyboard: CryptoChat.self)
|
|
}
|
|
internal enum DeFi: StoryboardType {
|
|
internal static let storyboardName = "DeFi"
|
|
|
|
internal static let deFiControllerMain = SceneType<DeFiControllerMain>(storyboard: DeFi.self, identifier: "DeFiControllerMain")
|
|
|
|
internal static let deFiNavigationControllerMain = SceneType<UIKit.UINavigationController>(storyboard: DeFi.self, identifier: "DeFiNavigationControllerMain")
|
|
}
|
|
internal enum Inheritance: StoryboardType {
|
|
internal static let storyboardName = "Inheritance"
|
|
|
|
internal static let initialScene = InitialSceneType<InheritanceController>(storyboard: Inheritance.self)
|
|
|
|
internal static let initial = SceneType<InheritanceController>(storyboard: Inheritance.self, identifier: "initial")
|
|
|
|
internal static let setup = SceneType<InheritanceControllerSetup>(storyboard: Inheritance.self, identifier: "setup")
|
|
}
|
|
internal enum Main: StoryboardType {
|
|
internal static let storyboardName = "Main"
|
|
|
|
internal static let initialScene = InitialSceneType<MainController>(storyboard: Main.self)
|
|
|
|
internal static let mainControllerRoot = SceneType<MainController>(storyboard: Main.self, identifier: "MainControllerRoot")
|
|
|
|
internal static let invite = SceneType<MainControllerInvite>(storyboard: Main.self, identifier: "invite")
|
|
}
|
|
internal enum P2P: StoryboardType {
|
|
internal static let storyboardName = "P2P"
|
|
|
|
internal static let initialScene = InitialSceneType<P2PControllerDashboard>(storyboard: P2P.self)
|
|
|
|
internal static let deal = SceneType<P2PControllerDeal>(storyboard: P2P.self, identifier: "deal")
|
|
|
|
internal static let initial = SceneType<P2PControllerDashboard>(storyboard: P2P.self, identifier: "initial")
|
|
|
|
internal static let order = SceneType<P2PControllerOrder>(storyboard: P2P.self, identifier: "order")
|
|
}
|
|
internal enum Resources: StoryboardType {
|
|
internal static let storyboardName = "Resources"
|
|
|
|
internal static let initialScene = InitialSceneType<ResourcesControllerSetup>(storyboard: Resources.self)
|
|
|
|
internal static let popup = SceneType<ResourcesControllerPopup>(storyboard: Resources.self, identifier: "popup")
|
|
|
|
internal static let quotaController = SceneType<ResourcesQuotaViewController>(storyboard: Resources.self, identifier: "quotaController")
|
|
|
|
internal static let ram = SceneType<ResourcesControllerSetupRAM>(storyboard: Resources.self, identifier: "ram")
|
|
|
|
internal static let resources = SceneType<ResourcesControllerSetupPerformance>(storyboard: Resources.self, identifier: "resources")
|
|
|
|
internal static let setup = SceneType<ResourcesControllerSetup>(storyboard: Resources.self, identifier: "setup")
|
|
}
|
|
internal enum Swap: StoryboardType {
|
|
internal static let storyboardName = "Swap"
|
|
|
|
internal static let swapControllerInvestment = SceneType<SwapControllerInvestment>(storyboard: Swap.self, identifier: "SwapControllerInvestment")
|
|
|
|
internal static let swapControllerMain = SceneType<SwapControllerMain>(storyboard: Swap.self, identifier: "SwapControllerMain")
|
|
|
|
internal static let swapNavigationMain = SceneType<UIKit.UINavigationController>(storyboard: Swap.self, identifier: "SwapNavigationMain")
|
|
}
|
|
internal enum Wallet: StoryboardType {
|
|
internal static let storyboardName = "Wallet"
|
|
|
|
internal static let initialScene = InitialSceneType<UIKit.UINavigationController>(storyboard: Wallet.self)
|
|
|
|
internal static let walletControllerAddBalances = SceneType<WalletControllerTokens>(storyboard: Wallet.self, identifier: "WalletControllerAddBalances")
|
|
|
|
internal static let history = SceneType<WalletControllerHistory>(storyboard: Wallet.self, identifier: "history")
|
|
|
|
internal static let receive = SceneType<WalletControllerReceive>(storyboard: Wallet.self, identifier: "receive")
|
|
|
|
internal static let transfer = SceneType<WalletControllerSend>(storyboard: Wallet.self, identifier: "transfer")
|
|
}
|
|
}
|
|
// swiftlint:enable explicit_type_interface identifier_name line_length type_body_length type_name
|
|
|
|
// MARK: - Implementation Details
|
|
|
|
internal protocol StoryboardType {
|
|
static var storyboardName: String { get }
|
|
}
|
|
|
|
internal extension StoryboardType {
|
|
static var storyboard: UIStoryboard {
|
|
let name = self.storyboardName
|
|
return UIStoryboard(name: name, bundle: BundleToken.bundle)
|
|
}
|
|
}
|
|
|
|
internal struct SceneType<T: UIViewController> {
|
|
internal let storyboard: StoryboardType.Type
|
|
internal let identifier: String
|
|
|
|
internal func instantiate() -> T {
|
|
let identifier = self.identifier
|
|
guard let controller = storyboard.storyboard.instantiateViewController(withIdentifier: identifier) as? T else {
|
|
fatalError("ViewController '\(identifier)' is not of the expected class \(T.self).")
|
|
}
|
|
return controller
|
|
}
|
|
|
|
@available(iOS 13.0, tvOS 13.0, *)
|
|
internal func instantiate(creator block: @escaping (NSCoder) -> T?) -> T {
|
|
return storyboard.storyboard.instantiateViewController(identifier: identifier, creator: block)
|
|
}
|
|
}
|
|
|
|
internal struct InitialSceneType<T: UIViewController> {
|
|
internal let storyboard: StoryboardType.Type
|
|
|
|
internal func instantiate() -> T {
|
|
guard let controller = storyboard.storyboard.instantiateInitialViewController() as? T else {
|
|
fatalError("ViewController is not of the expected class \(T.self).")
|
|
}
|
|
return controller
|
|
}
|
|
|
|
@available(iOS 13.0, tvOS 13.0, *)
|
|
internal func instantiate(creator block: @escaping (NSCoder) -> T?) -> T {
|
|
guard let controller = storyboard.storyboard.instantiateInitialViewController(creator: block) else {
|
|
fatalError("Storyboard \(storyboard.storyboardName) does not have an initial scene.")
|
|
}
|
|
return controller
|
|
}
|
|
}
|
|
|
|
// swiftlint:disable convenience_type
|
|
private final class BundleToken {
|
|
static let bundle: Bundle = {
|
|
#if SWIFT_PACKAGE
|
|
return Bundle.module
|
|
#else
|
|
return Bundle(for: BundleToken.self)
|
|
#endif
|
|
}()
|
|
}
|
|
// swiftlint:enable convenience_type
|