"use client"; import { useState } from "react"; import MagicReveal from "@/components/ui/MagicReveal"; import Button from "@/components/ui/Button"; interface MaconClientProps { type?: "slider" | "form" | "faq" | "floating"; avantLabel?: string; apresLabel?: string; avantImage?: string; apresImage?: string; faqs?: { q: string; a: string }[]; } export default function MaconClient({ type, avantLabel, apresLabel, avantImage, apresImage, faqs, }: MaconClientProps) { if (type === "slider") { return ( ); } if (type === "form") { return ; } if (type === "faq") { return ; } if (type === "floating") { return ; } return null; } /* ============================================================ FAQ ACCORDION ============================================================ */ function FaqAccordion({ faqs }: { faqs: { q: string; a: string }[] }) { const [openIdx, setOpenIdx] = useState(null); return (
{faqs.map((faq, i) => { const isOpen = openIdx === i; return (
{isOpen && (

{faq.a}

)}
); })}
); } /* ============================================================ SMART DEVIS FORM ============================================================ */ function DevisForm() { const [step, setStep] = useState<"type" | "details">("type"); const [projectType, setProjectType] = useState(""); if (step === "details") { return (
2/2

Vos coordonnées

Projet : {projectType}