import SwiftUI

struct BaseNavigationView: View {
    @EnvironmentObject var store: AppStore
    private var state: AppState {
        store.state
    }

    public var body: some View {
        switch state.currentFlow {
        case .start:
            StartScreen()

        case .welcome:
            WelcomeScreen()

        case .accounts:
            switch state.accountsState.navigation {
            case .main:
                AccountsMainScreen()
            }

        case .registration:
            RegistrationScreen()

        case .contacts:
            ContactsMainScreen()

        case .chats:
            ChatsMainScreen()

        case .settings:
            SettingsMainScreen()
        }
    }
}
