'use client' import { useState } from 'react' import { motion, AnimatePresence } from 'motion/react' import { Pencil, CreditCard, Lightbulb, Check, ArrowRight, Sparkles } from 'lucide-react' import { Button } from '@/components/ui/button' import { useLanguage } from '@/lib/i18n' interface Props { onDone: () => void onTry: (href: string) => void } const ACTIONS = [ { icon: Pencil, color: 'text-violet-500', bg: 'bg-violet-500/10', key: 'write', href: '/home' }, { icon: CreditCard, color: 'text-blue-500', bg: 'bg-blue-500/10', key: 'flashcards', href: '/revision' }, { icon: Lightbulb, color: 'text-amber-500', bg: 'bg-amber-500/10', key: 'brainstorm', href: '/brainstorm' }, ] export function OnboardingStepFeatures({ onDone, onTry }: Props) { const { t } = useLanguage() const [checked, setChecked] = useState>(new Set()) function handleTry(key: string, href: string) { setChecked(prev => new Set([...prev, key])) onTry(href) } const allChecked = checked.size === ACTIONS.length return (

{t('onboarding.step_features_title')}

{t('onboarding.step_features_subtitle')}

{ACTIONS.map(({ icon: Icon, color, bg, key, href }, i) => { const done = checked.has(key) return ( {/* Checkmark */} {done && ( )} {/* Icon */} {/* Text */}

{t(`onboarding.action_${key}_title`)}

{t(`onboarding.action_${key}_desc`)}

{/* Essayer — minimise wizard + navigue */}
) })}
) }