import Hero from "@/components/Hero";
import Welcome from "@/components/Welcome";
import ShowcaseImage from "@/components/ShowcaseImage";
import QuoteSection from "@/components/QuoteSection";
import SuitesHighlights from "@/components/SuitesHighlights";
import Experiences from "@/components/Experiences";
import ScrollReveal from "@/components/ScrollReveal";
import CallToAction from "@/components/CallToAction";
import Amenities from "@/components/Amenities";

import { getDictionary } from "@/dictionaries/get-dictionary";

export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }) {
  const { lang } = await params;
  const dict = await getDictionary(lang as 'en' | 'tr');
  return {
    title: `${dict.hero.title} - ${dict.hero.desc.split('.')[0]}`,
    description: dict.hero.desc,
  };
}

export default async function Home({ params }: { params: Promise<{ lang: string }> }) {
  const { lang } = await params;
  const dict = await getDictionary(lang as 'en' | 'tr');

  return (
    <main className="relative w-full bg-[#FAF7F0]">
      <Hero lang={lang} dict={dict} />
      <Welcome lang={lang} dict={dict} />
      <ShowcaseImage />
      <QuoteSection dict={dict} />
      <SuitesHighlights lang={lang} dict={dict} />
      <Experiences dict={dict} />
      <ScrollReveal />
      <CallToAction lang={lang} dict={dict} />


    </main>
  );
}
