'use client'; import React, { useState } from 'react'; import { motion } from 'framer-motion'; import Link from 'next/link'; import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card'; import { Button } from '@/components/ui/Button'; import { Badge } from '@/components/ui/Badge'; import { BillingToggle } from '@/components/ui/BillingToggle'; interface PricingProps { t: any; // i18n translation function } export const Pricing: React.FC = ({ t }) => { const [billingPeriod, setBillingPeriod] = useState<'month' | 'year'>('month'); const plans = [ { key: 'free', popular: false, }, { key: 'pro', popular: true, }, { key: 'business', popular: false, }, ]; return (

{t.pricing.title}

{t.pricing.subtitle}

{plans.map((plan, index) => ( {plan.popular && (
{t.pricing[plan.key].badge}
)} {t.pricing[plan.key].title}
{plan.key === 'free' ? t.pricing[plan.key].price : billingPeriod === 'month' ? t.pricing[plan.key].price : plan.key === 'pro' ? '€90' : '€290'} {plan.key === 'free' ? t.pricing[plan.key].period : billingPeriod === 'month' ? t.pricing[plan.key].period : 'per year'}
{billingPeriod === 'year' && plan.key !== 'free' && ( Save 16% )}
    {t.pricing[plan.key].features.map((feature: string, index: number) => (
  • {feature}
  • ))}
))}
); };