'use client';

import Link from 'next/link';
import { useTranslations } from 'next-intl';
import { motion } from 'framer-motion';
import { Home } from 'lucide-react';

import { Button } from '@/components/ui/button';

/**
 * 404 Not Found page
 */
export default function NotFound() {
  const t = useTranslations('errors');

  return (
    <div className="flex min-h-screen flex-col items-center justify-center bg-background p-4">
      <motion.div
        initial={{ opacity: 0, y: 20 }}
        animate={{ opacity: 1, y: 0 }}
        transition={{ duration: 0.4 }}
        className="text-center"
      >
        <h1 className="text-9xl font-bold text-primary">404</h1>
        <h2 className="mt-4 text-2xl font-semibold">{t('notFound')}</h2>
        <p className="mt-2 text-muted-foreground">{t('notFoundDescription')}</p>
        <Button asChild className="mt-8">
          <Link href="/dashboard">
            <Home className="mr-2 h-4 w-4" />
            {t('goHome')}
          </Link>
        </Button>
      </motion.div>
    </div>
  );
}
