import SwiftUI struct MainTabView: View { @EnvironmentObject var authManager: AuthManager @AppStorage("colorScheme") private var colorSchemeRaw: String = "dark" @State private var selectedTab = 0 var preferredColorScheme: ColorScheme? { colorSchemeRaw == "light" ? .light : .dark } let tabs: [(icon: String, label: String, color: Color)] = [ ("house.fill", "Главная", Theme.teal), ("chart.bar.fill", "Трекер", Theme.indigo), ("heart.fill", "Здоровье", Theme.pink), ("building.columns.fill", "Накопления", Theme.purple), ("gearshape.fill", "Ещё", Theme.blue), ] var body: some View { VStack(spacing: 0) { // Content Group { switch selectedTab { case 0: DashboardView() case 1: TrackerView() case 2: HealthView() case 3: SavingsView() case 4: SettingsView() default: DashboardView() } } .frame(maxWidth: .infinity, maxHeight: .infinity) // Custom Tab Bar HStack(spacing: 0) { ForEach(0.. Void var body: some View { Button(action: action) { VStack(spacing: 4) { ZStack { if isSelected { // Glow effect Circle() .fill(color.opacity(0.3)) .frame(width: 40, height: 40) .blur(radius: 10) Circle() .fill(color.opacity(0.15)) .frame(width: 36, height: 36) } Image(systemName: icon) .font(.system(size: 18, weight: isSelected ? .semibold : .regular)) .foregroundColor(isSelected ? color : Color(hex: "555566")) } .frame(height: 32) Text(label) .font(.system(size: 10, weight: isSelected ? .medium : .regular)) .foregroundColor(isSelected ? color : Color(hex: "555566")) } .frame(maxWidth: .infinity) } .buttonStyle(.plain) } }