//
//  ContentView.swift
//  PlaySync
//
//  Created by Assistant on 2025-08-05
//  Updated to include Motorsports Rentals in navigation
//

import SwiftUI

struct ContentView: View {
    @State private var selectedTab = 0
    @State private var isLoggedIn = true
    @State private var currentUser: UserProfile? = UserProfile(username: "Demo User", email: "demo@test.com")
    
    var body: some View {
        TabView(selection: $selectedTab) {
            DashboardView(currentUser: currentUser, isLoggedIn: $isLoggedIn, selectedTab: $selectedTab)
                .tabItem {
                    Image(systemName: "house.fill")
                    Text("Home")
                }
                .tag(0)
            
            MotorsportsRentalsView()
                .tabItem {
                    Image(systemName: "car.rear.and.tire.marks")
                    Text("Motorsports")
                }
                .tag(1)
            

            // Activity tab removed
            // Health tab removed
            
            SubscriptionView()
                .tabItem {
                    Image(systemName: "gear")
                    Text("Settings")
                }
                .tag(2)
        }
        .accentColor(.blue)
        .preferredColorScheme(.dark)
    }
}