
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Shield, Lock, Eye, Database, UserCheck, Globe } from "lucide-react";
import { useTranslation } from "react-i18next";
import SEO from "@/components/SEO";

const Privacy = () => {
  const { t } = useTranslation();

  // Get the current URL for Open Graph
  const currentUrl = typeof window !== 'undefined' ? window.location.href : 'https://shopcall.ai/privacy';

  const privacyPrinciples = [
    {
      icon: Shield,
      title: t('privacy.principles.dataProtection.title'),
      description: t('privacy.principles.dataProtection.description')
    },
    {
      icon: Lock,
      title: t('privacy.principles.secureStorage.title'),
      description: t('privacy.principles.secureStorage.description')
    },
    {
      icon: Eye,
      title: t('privacy.principles.transparency.title'),
      description: t('privacy.principles.transparency.description')
    },
    {
      icon: UserCheck,
      title: t('privacy.principles.yourRights.title'),
      description: t('privacy.principles.yourRights.description')
    }
  ];

  return (
    <div className="min-h-screen bg-slate-900 text-white">
      <SEO
        title={t('privacy.seo.title')}
        description={t('privacy.seo.description')}
        keywords={t('privacy.seo.keywords')}
        ogTitle={t('privacy.seo.ogTitle')}
        ogDescription={t('privacy.seo.ogDescription')}
        ogUrl={currentUrl}
        ogType="website"
      />
      {/* Header */}
      <header className="border-b border-slate-800">
        <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
          <div className="flex items-center justify-between h-16">
            <div className="flex items-center gap-3">
              <img src="/uploads/e0ddbf09-622c-426a-851f-149776e300c0.png" alt="ShopCall.ai" className="w-8 h-8" />
              <span className="text-xl font-bold text-white">ShopCall.ai</span>
            </div>
            <Button variant="outline" className="border-slate-600 text-slate-300 hover:bg-slate-800" asChild>
              <a href="/">{t('privacy.backHome')}</a>
            </Button>
          </div>
        </div>
      </header>

      {/* Hero Section */}
      <section className="py-20">
        <div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
          <div className="text-center mb-12">
            <h1 className="text-5xl font-bold mb-6">{t('privacy.title')}</h1>
            <p className="text-xl text-slate-300">
              {t('privacy.lastUpdated')}
            </p>
          </div>

          {/* Privacy Principles */}
          <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-16">
            {privacyPrinciples.map((principle, index) => (
              <Card key={index} className="bg-slate-700/50 border-slate-600 text-center">
                <CardHeader>
                  <div className="w-12 h-12 bg-[#52b3d0]/20 rounded-lg flex items-center justify-center mb-4 mx-auto">
                    <principle.icon className="h-6 w-6 text-[#52b3d0]" />
                  </div>
                  <CardTitle className="text-white text-lg">{principle.title}</CardTitle>
                </CardHeader>
                <CardContent>
                  <p className="text-slate-300 text-sm">{principle.description}</p>
                </CardContent>
              </Card>
            ))}
          </div>

          {/* Policy Content */}
          <div className="space-y-8">
            <Card className="bg-slate-800/50 border-slate-700">
              <CardHeader>
                <CardTitle className="text-white text-xl">{t('privacy.sections.informationWeCollect.title')}</CardTitle>
              </CardHeader>
              <CardContent className="text-slate-300 space-y-4">
                <p>{t('privacy.sections.informationWeCollect.intro')}</p>
                <ul className="list-disc list-inside space-y-2 ml-4">
                  <li>{t('privacy.sections.informationWeCollect.items.account')}</li>
                  <li>{t('privacy.sections.informationWeCollect.items.support')}</li>
                  <li>{t('privacy.sections.informationWeCollect.items.newsletter')}</li>
                  <li>{t('privacy.sections.informationWeCollect.items.surveys')}</li>
                </ul>
                <p>{t('privacy.sections.informationWeCollect.outro')}</p>
              </CardContent>
            </Card>

            <Card className="bg-slate-800/50 border-slate-700">
              <CardHeader>
                <CardTitle className="text-white text-xl">{t('privacy.sections.howWeUse.title')}</CardTitle>
              </CardHeader>
              <CardContent className="text-slate-300 space-y-4">
                <p>{t('privacy.sections.howWeUse.intro')}</p>
                <ul className="list-disc list-inside space-y-2 ml-4">
                  <li>{t('privacy.sections.howWeUse.items.provide')}</li>
                  <li>{t('privacy.sections.howWeUse.items.transactions')}</li>
                  <li>{t('privacy.sections.howWeUse.items.notices')}</li>
                  <li>{t('privacy.sections.howWeUse.items.respond')}</li>
                  <li>{t('privacy.sections.howWeUse.items.monitor')}</li>
                </ul>
              </CardContent>
            </Card>

            <Card className="bg-slate-800/50 border-slate-700">
              <CardHeader>
                <CardTitle className="text-white text-xl">{t('privacy.sections.dataSecurity.title')}</CardTitle>
              </CardHeader>
              <CardContent className="text-slate-300 space-y-4">
                <p>{t('privacy.sections.dataSecurity.intro')}</p>
                <ul className="list-disc list-inside space-y-2 ml-4">
                  <li>{t('privacy.sections.dataSecurity.items.encryption')}</li>
                  <li>{t('privacy.sections.dataSecurity.items.audits')}</li>
                  <li>{t('privacy.sections.dataSecurity.items.access')}</li>
                  <li>{t('privacy.sections.dataSecurity.items.training')}</li>
                  <li>{t('privacy.sections.dataSecurity.items.compliance')}</li>
                </ul>
              </CardContent>
            </Card>

            <Card className="bg-slate-800/50 border-slate-700">
              <CardHeader>
                <CardTitle className="text-white text-xl">{t('privacy.sections.yourRightsSection.title')}</CardTitle>
              </CardHeader>
              <CardContent className="text-slate-300 space-y-4">
                <p>{t('privacy.sections.yourRightsSection.intro')}</p>
                <ul className="list-disc list-inside space-y-2 ml-4">
                  <li>{t('privacy.sections.yourRightsSection.items.access')}</li>
                  <li>{t('privacy.sections.yourRightsSection.items.correct')}</li>
                  <li>{t('privacy.sections.yourRightsSection.items.delete')}</li>
                  <li>{t('privacy.sections.yourRightsSection.items.object')}</li>
                  <li>{t('privacy.sections.yourRightsSection.items.portability')}</li>
                  <li>{t('privacy.sections.yourRightsSection.items.withdraw')}</li>
                </ul>
                <p>{t('privacy.sections.yourRightsSection.contact')}</p>
              </CardContent>
            </Card>

            <Card className="bg-slate-800/50 border-slate-700">
              <CardHeader>
                <CardTitle className="text-white text-xl">{t('privacy.sections.contactUs.title')}</CardTitle>
              </CardHeader>
              <CardContent className="text-slate-300">
                <p>{t('privacy.sections.contactUs.intro')}</p>
                <div className="mt-4 space-y-2">
                  <p>{t('privacy.sections.contactUs.email')}</p>
                  <p>{t('privacy.sections.contactUs.address')}</p>
                  <p>{t('privacy.sections.contactUs.phone')}</p>
                </div>
              </CardContent>
            </Card>
          </div>
        </div>
      </section>

      {/* Footer */}
      <footer className="bg-slate-900 border-t border-slate-800 py-8">
        <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
          <div className="flex justify-center items-center gap-4 text-sm text-slate-500">
            <span>{t('privacy.footer.copyright')}</span>
            <span>•</span>
            <a href="/about" className="hover:text-slate-300">{t('privacy.footer.about')}</a>
            <span>•</span>
            <a href="/contact" className="hover:text-slate-300">{t('privacy.footer.contact')}</a>
          </div>
        </div>
      </footer>
    </div>
  );
};

export default Privacy;
