import SwiftUI

struct MainTabView: View {
    @Environment(AuthSession.self) private var auth

    var body: some View {
        TabView {
            HeimView()
                .tabItem { Label("Heim", systemImage: "house.fill") }

            RoutesListView()
                .tabItem { Label("Touren", systemImage: "map.fill") }

            TrackingView()
                .tabItem { Label("Aufnehmen", systemImage: "figure.walk") }

            StatisticsView()
                .tabItem { Label("Statistik", systemImage: "chart.bar.fill") }

            SettingsView()
                .tabItem { Label("Mehr", systemImage: "person.crop.circle") }
        }
        .task { await auth.loadProfile() }
    }
}
