import { Suspense } from "react";
import { getTranslations } from "next-intl/server";

import {
  AddGuidesButton,
  Offers,
  OffersSkeleton,
  ProductSelectionProvider,
} from "@/components/domains/additional-purchases";
import { Typography } from "@/components/ui";

import styles from "./AddGuidesPage.module.scss";

export default async function AddGuidesPage() {
  const t = await getTranslations("AdditionalPurchases.add-guides");

  return (
    <ProductSelectionProvider>
      <Typography as="h2" size="xl" weight="semiBold" className={styles.title}>
        {t("title")}
      </Typography>
      <Typography as="h3" size="sm" className={styles.subtitle}>
        {t("subtitle")}
      </Typography>
      <Suspense fallback={<OffersSkeleton />}>
        <Offers />
      </Suspense>
      <Typography align="left" color="secondary" className={styles.description}>
        {t("description")}
      </Typography>
      <AddGuidesButton />
    </ProductSelectionProvider>
  );
}
