import { Link } from 'react-router-dom';
import { useLanguage } from '../context/LanguageContext';
import Footer from '../components/Footer';

function ImageGeneration() {
    const { t } = useLanguage();

    const features = [
        {
            id: 1,
            title: 'Brand Style Transfer',
            description: t('imageGen.features.styleTransfer.description'),
            icon: '🎨',
            stats: {
                styles: '25+',
                speed: '< 30s',
                quality: 'HD'
            }
        },
        {
            id: 2,
            title: 'Product Visualization',
            description: t('imageGen.features.product.description'),
            icon: '📦',
            stats: {
                formats: '12+',
                angles: '360°',
                backgrounds: '50+'
            }
        },
        {
            id: 3,
            title: 'Social Media Content',
            description: t('imageGen.features.social.description'),
            icon: '📱',
            stats: {
                templates: '100+',
                formats: 'All',
                customization: 'Full'
            }
        }
    ];

    return (
        <div className="relative min-h-screen bg-white">
            {/* Technical grid background */}
            <div className="fixed inset-0 technical-grid opacity-50 pointer-events-none"></div>

            <div className="max-w-[1600px] mx-auto px-8 sm:px-12 lg:px-16 pt-32">
                {/* Header section */}
                <div className="grid-layout mb-16">
                    <div className="col-span-12 md:col-span-8">
                        <h1 className="brutalist-heading relative">
                            {t('imageGen.title')}
                            <div className="absolute -right-8 -top-8 w-16 h-16">
                                <div className="geometric-shape circle w-full h-full bg-black"></div>
                            </div>
                        </h1>
                        <p className="monospace text-xl md:text-2xl font-medium tracking-tight max-w-2xl">
                            {t('imageGen.description')}
                        </p>
                    </div>
                </div>

                {/* Main content */}
                <div className="grid-layout gap-8">
                    {/* Features Overview */}
                    <div className="col-span-12">
                        <div className="brutalist-card p-8">
                            <h2 className="text-2xl font-black uppercase mb-8">{t('imageGen.features.title')}</h2>
                            <div className="grid grid-cols-1 md:grid-cols-3 gap-8">
                                {features.map((feature) => (
                                    <div key={feature.id} className="brutalist-card p-6 relative hover:-translate-y-1 transition-transform">
                                        <div className="absolute -right-2 -top-2 w-8 h-8 bg-black text-white flex items-center justify-center">
                                            <span className="text-xl">{feature.icon}</span>
                                        </div>
                                        <h3 className="text-xl font-bold mb-4">{feature.title}</h3>
                                        <p className="monospace mb-6">{feature.description}</p>
                                        <div className="section-divider"></div>
                                        <div className="grid grid-cols-3 gap-4 mt-4">
                                            {Object.entries(feature.stats).map(([key, value]) => (
                                                <div key={key}>
                                                    <span className="monospace text-sm block capitalize">{key}</span>
                                                    <span className="font-bold">{value}</span>
                                                </div>
                                            ))}
                                        </div>
                                    </div>
                                ))}
                            </div>
                        </div>
                    </div>

                    {/* Image Generator Demo */}
                    <div className="col-span-12 md:col-span-8">
                        <div className="brutalist-card p-0 overflow-hidden">
                            <div className="relative aspect-video">
                                <div className="absolute inset-0 grid grid-cols-2 gap-2 p-4">
                                    <div className="bg-gray-100 rounded"></div>
                                    <div className="bg-gray-100 rounded"></div>
                                    <div className="bg-gray-100 rounded"></div>
                                    <div className="bg-gray-100 rounded"></div>
                                </div>
                                <div className="absolute inset-0 diagonal-lines"></div>
                            </div>
                            <div className="p-6">
                                <h3 className="text-xl font-bold mb-4">{t('imageGen.demo.title')}</h3>
                                <p className="monospace mb-4">{t('imageGen.demo.description')}</p>
                                <Link to="/register" className="brutalist-button inline-block">
                                    {t('imageGen.demo.cta')} →
                                </Link>
                            </div>
                        </div>
                    </div>

                    {/* Style Presets */}
                    <div className="col-span-12 md:col-span-4">
                        <div className="brutalist-card p-6">
                            <h3 className="text-xl font-bold mb-6">{t('imageGen.styles.title')}</h3>
                            <div className="space-y-4">
                                {['Minimalist', 'Brutalist', 'Retro', 'Modern', 'Abstract'].map((style) => (
                                    <div key={style} className="brutalist-card p-3 hover:-translate-x-2 transition-transform cursor-pointer">
                                        <span className="monospace">{style}</span>
                                    </div>
                                ))}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <Footer />
        </div>
    );
}

export default ImageGeneration; 