//
//  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
            )
        }
    }
}
