'use client'; import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { useLang } from '@/context/LangContext'; const faqs = [ { question: { en: 'How does GreenLens identify a plant?', de: 'Wie erkennt GreenLens eine Pflanze?', es: 'Como identifica GreenLens una planta?' }, answer: { en: 'GreenLens analyzes the plant photo and combines that with app-side care guidance so you can move from scan to next steps faster.', de: 'GreenLens analysiert das Pflanzenfoto und verbindet das Ergebnis mit Pflegehinweisen in der App, damit du schneller zu klaren naechsten Schritten kommst.', es: 'GreenLens analiza la foto de la planta y combina el resultado con indicaciones de cuidado dentro de la app para que avances mas rapido.' } }, { question: { en: 'Is GreenLens free to use?', de: 'Ist GreenLens kostenlos?', es: 'Es GreenLens gratuito?' }, answer: { en: 'GreenLens includes free functionality plus paid options such as subscriptions and credit top-ups for advanced AI features.', de: 'GreenLens bietet kostenlose Funktionen und zusaetzlich kostenpflichtige Optionen wie Abos und Credit-Top-ups fuer erweiterte KI-Funktionen.', es: 'GreenLens incluye funciones gratuitas y tambien opciones de pago como suscripciones y creditos para funciones de IA mas umfangreiche.' } }, { question: { en: 'Can I use it offline?', de: 'Kann ich die App offline nutzen?', es: 'Puedo usarla sin conexion?' }, answer: { en: 'Some experiences may require a connection, especially for scan-related features. Saved information inside the app can remain available afterward.', de: 'Einige Funktionen benoetigen eine Verbindung, besonders scanbezogene Features. Gespeicherte Informationen in der App koennen danach weiter verfuegbar bleiben.', es: 'Algunas funciones requieren conexion, especialmente las relacionadas con escaneos. La informacion guardada puede seguir disponible despues.' } }, { question: { en: 'What kind of plants can I use it for?', de: 'Fuer welche Pflanzen kann ich die App nutzen?', es: 'Para que tipo de plantas puedo usar la app?' }, answer: { en: 'GreenLens is built for everyday plant owners who want help with houseplants, garden plants, and general care questions.', de: 'GreenLens richtet sich an Pflanzenbesitzer, die Hilfe bei Zimmerpflanzen, Gartenpflanzen und allgemeinen Pflegefragen wollen.', es: 'GreenLens esta pensada para personas que quieren ayuda con plantas de interior, jardin y preguntas generales de cuidado.' } }, { question: { en: 'How do I start my plant collection?', de: 'Wie starte ich meine Pflanzensammlung?', es: 'Como empiezo mi coleccion de plantas?' }, answer: { en: 'Start with a scan, review the result, and save the plant to your collection to keep notes, reminders, and follow-up care in one place.', de: 'Starte mit einem Scan, pruefe das Ergebnis und speichere die Pflanze in deiner Sammlung, damit Notizen, Erinnerungen und Pflege an einem Ort bleiben.', es: 'Empieza con un escaneo, revisa el resultado y guarda la planta en tu coleccion para mantener notas, recordatorios y cuidado en un solo lugar.' } } ]; const TEXT = { de: { tag: 'Fragen', h2: ['Haeufig gestellte', 'Fragen'], desc: 'Alles, was du ueber GreenLens und den Einstieg wissen musst.' }, en: { tag: 'Questions', h2: ['Frequently Asked', 'Questions'], desc: 'Everything you need to know about GreenLens and getting started.' }, es: { tag: 'Preguntas', h2: ['Preguntas', 'Frecuentes'], desc: 'Todo lo que necesitas saber sobre GreenLens y el inicio.' }, } export default function FAQ() { const { lang } = useLang(); const [activeIndex, setActiveIndex] = useState(null); const text = TEXT[lang]; return (
{text.tag}

{text.h2[0]} {text.h2[1]}

{text.desc}

{faqs.map((faq, index) => (
setActiveIndex(activeIndex === index ? null : index)} >

{faq.question[lang]}

{activeIndex === index && (

{faq.answer[lang]}

)}
))}
); }