import { setRequestLocale } from 'next-intl/server';
import type { Metadata } from 'next';
import { getTranslations } from 'next-intl/server';
import Link from 'next/link';

type Props = {
  params: Promise<{ locale: string }>;
};

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  const { locale } = await params;
  const t = await getTranslations({ locale, namespace: 'pages.privacy.seo' });

  return {
    title: t('title'),
    description: t('description'),
  };
}

export default async function PrivacyPage({ params }: Props) {
  const { locale } = await params;
  setRequestLocale(locale);

  const t = await getTranslations('pages.privacy');

  return (
    <main className="min-h-screen py-20 px-4">
      <div className="max-w-4xl mx-auto">
        {/* Breadcrumb */}
        <nav className="mb-8">
          <Link href={`/${locale}`} className="text-zinc-400 hover:text-white transition-colors">
            Home
          </Link>
          <span className="text-zinc-600 mx-2">/</span>
          <span className="text-white">{t('content.title')}</span>
        </nav>

        <article className="prose prose-invert prose-zinc max-w-none">
          <h1>{t('content.title')}</h1>
          <p className="text-zinc-400">{t('content.lastUpdated')}</p>

          <h2>1. Data Collection</h2>
          <p>
            We collect personal information that you voluntarily provide to us when you contact us through our website.
            This may include your name, email address, and message content.
          </p>

          <h2>2. Use of Data</h2>
          <p>
            We use the information we collect to respond to your inquiries and provide our services.
            We do not sell or share your personal information with third parties.
          </p>

          <h2>3. Cookies</h2>
          <p>
            Our website uses cookies to improve your browsing experience and analyze website traffic.
            You can control cookie preferences through your browser settings.
          </p>

          <h2>4. Your Rights</h2>
          <p>
            You have the right to access, correct, or delete your personal data.
            Contact us at privacy@damjan-savic.com for any privacy-related requests.
          </p>

          <h2>5. Contact</h2>
          <p>
            For questions about this privacy policy, please contact us at:
            <br />
            Email: privacy@damjan-savic.com
          </p>
        </article>
      </div>
    </main>
  );
}
