import { notFound } from "next/navigation"
import DestinationHeroSection from "@/components/tours/destination-hero-section"
import DestinationContentSection from "@/components/tours/destination-content-section"
import Footer from "@/components/footer"
import { destinations, moreDestinations } from "@/lib/destinations-data"

interface PageProps {
  params: {
    destination: string
  }
}

export async function generateStaticParams() {
  const allDestinations = [...destinations, ...moreDestinations]
  return allDestinations.map((destination) => ({
    destination: destination.slug,
  }))
}

export default function DestinationPage({ params }: PageProps) {
  const allDestinations = [...destinations, ...moreDestinations]
  const destination = allDestinations.find((d) => d.slug === params.destination)

  if (!destination) {
    notFound()
  }

  return (
    <div className="min-h-screen">
      <DestinationHeroSection destination={destination} />
      <DestinationContentSection destination={destination} />
    </div>
  )
}
