//
//  AdaptiveHomeContent.swift
//  SportsTime
//
//  Routes to the appropriate home content variant based on the selected design style.
//

import SwiftUI
import SwiftData

struct AdaptiveHomeContent: View {
    @Binding var showNewTrip: Bool
    @Binding var selectedTab: Int
    @Binding var selectedSuggestedTrip: SuggestedTrip?

    let savedTrips: [SavedTrip]
    let suggestedTripsGenerator: SuggestedTripsGenerator
    let displayedTips: [PlanningTip]

    var body: some View {
        switch DesignStyleManager.shared.currentStyle {
        case .classic:
            HomeContent_Classic(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .classicAnimated:
            HomeContent_ClassicAnimated(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .brutalist:
            HomeContent_Brutalist(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .luxuryEditorial:
            HomeContent_LuxuryEditorial(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .retroFuturism:
            HomeContent_RetroFuturism(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .glassmorphism:
            HomeContent_Glassmorphism(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .neoBrutalist:
            HomeContent_NeoBrutalist(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .organic:
            HomeContent_Organic(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .maximalistChaos:
            HomeContent_MaximalistChaos(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .swissModernist:
            HomeContent_SwissModernist(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .playful:
            HomeContent_Playful(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .artDeco:
            HomeContent_ArtDeco(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .darkIndustrial:
            HomeContent_DarkIndustrial(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .softPastel:
            HomeContent_SoftPastel(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .flighty:
            HomeContent_Flighty(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .seatGeek:
            HomeContent_SeatGeek(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .appleMaps:
            HomeContent_AppleMaps(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .things3:
            HomeContent_Things3(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .airbnb:
            HomeContent_Airbnb(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .spotify:
            HomeContent_Spotify(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .nikeRunClub:
            HomeContent_NikeRunClub(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .fantastical:
            HomeContent_Fantastical(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .strava:
            HomeContent_Strava(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )

        case .carrotWeather:
            HomeContent_CarrotWeather(
                showNewTrip: $showNewTrip,
                selectedTab: $selectedTab,
                selectedSuggestedTrip: $selectedSuggestedTrip,
                savedTrips: savedTrips,
                suggestedTripsGenerator: suggestedTripsGenerator,
                displayedTips: displayedTips
            )
        }
    }
}
