import routeFactory from '@/assets/constants/routeFactory';
import images from '@/assets/images/images';
import Button from '@/components/uikit/button';
import { ILayoutLocaleParams } from '@/models/layout';
import { getTranslations } from 'next-intl/server';

export default async function NotFound({
  params,
}: {
  params: ILayoutLocaleParams;
}) {
  const t = await getTranslations({ locale: params.locale });
  const routes = routeFactory(t, params.locale);

  return (
    <div className="container mx-auto flex h-svh flex-col items-center justify-center gap-6">
      <h2 className="text-center text-4xl md:text-[5rem]">
        {t('pages_notFound_title')}
      </h2>
      <p className="text-center text-xl text-gray-300 md:text-2xl">
        {t('pages_notFound_description')}
      </p>
      <div>
        <img
          alt="404 page"
          src={images.notFound.src}
          className="aspect-square"
        />
      </div>
      <Button link={routes.home.route()} endIcon="showMore" className="w-fit">
        {t('pages_notFound_button')}
      </Button>
    </div>
  );
}
