﻿import React from 'react';
import { Head, Link } from '@inertiajs/react';
import { useLocalizedRoutes } from '@/hooks/useLocalizedRoutes';
import { useTranslation } from 'react-i18next';
import MarketingLayout from '@/layouts/mainWebsite';

interface OccasionsProps {
  type: string;
}

const Occasions: React.FC<OccasionsProps> = ({ type }) => {
  const { t } = useTranslation('marketing');
  const { localizedPath } = useLocalizedRoutes();

  const occasionsContent = {
    hochzeit: {
      title: t('occasions.weddings.title'),
      description: t('occasions.weddings.description'),
      features: [
        t('occasions.weddings.benefit1'),
        t('occasions.weddings.benefit2'),
        t('occasions.weddings.benefit3'),
        t('occasions.weddings.benefit4'),
      ],
      cta: t('occasions.cta'),
    },
    geburtstag: {
      title: t('occasions.birthdays.title'),
      description: t('occasions.birthdays.description'),
      features: [
        t('occasions.birthdays.benefit1'),
        t('occasions.birthdays.benefit2'),
        t('occasions.birthdays.benefit3'),
        t('occasions.birthdays.benefit4'),
      ],
      cta: t('occasions.cta'),
    },
    firmenevent: {
      title: t('occasions.corporate.title'),
      description: t('occasions.corporate.description'),
      features: [
        t('occasions.corporate.benefit1'),
        t('occasions.corporate.benefit2'),
        t('occasions.corporate.benefit3'),
        t('occasions.corporate.benefit4'),
      ],
      cta: t('occasions.cta'),
    },
  };

  const content = occasionsContent[type as keyof typeof occasionsContent] || occasionsContent.hochzeit;

  return (
    <MarketingLayout title={content.title}>
      <Head title={content.title} />
      <div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-20 px-4">
        <div className="container mx-auto max-w-4xl">
          <div className="text-center mb-12">
            <h1 className="text-4xl md:text-5xl font-bold text-gray-900 dark:text-gray-100 mb-6 font-display">{content.title}</h1>
            <p className="text-xl text-gray-600 dark:text-gray-300 mb-8 font-sans-marketing">{content.description}</p>
            <Link href={localizedPath('/packages')} className="bg-[#FFB6C1] text-white px-8 py-4 rounded-full font-bold hover:bg-pink-600 transition">
              {content.cta}
            </Link>
          </div>
          <div className="grid md:grid-cols-3 gap-8">
            {content.features.map((feature, index) => (
              <div key={index} className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md text-center">
                <div className="w-12 h-12 bg-[#FFB6C1] rounded-full flex items-center justify-center mx-auto mb-4">
                  <span className="text-white font-bold">{index + 1}</span>
                </div>
                <h3 className="text-lg font-semibold mb-2 text-gray-900 dark:text-gray-100">{feature}</h3>
              </div>
            ))}
          </div>
        </div>
      </div>
    </MarketingLayout>
  );
};

export default Occasions;