import type { Metadata } from "next";
import HomePage from "../_ui/HomePage";
import { getLanguageAlternates, toAbsoluteUrl } from "@/lib/seo";

export async function generateMetadata({
  params,
}: {
  params: Promise<{ locale: string }>;
}): Promise<Metadata> {
  const { locale } = await params;
  const languages = getLanguageAlternates({ pathWithoutLocale: "" });
  return {
    alternates: {
      canonical: toAbsoluteUrl(`/${locale}`),
      languages,
    },
  };
}

export default function Page() {
  return <HomePage />;
}

