"use client"; import SubmitToast from "@/app/components/ui/SubmitToast"; import { useMemo, useState } from "react"; type IndustryOption = { value: string; label: string }; const emptyRegistration = { fullName: "", phone: "", email: "", company: "", jobTitle: "", industry: "", notes: "", }; export default function RegistrationForm({ data, }: { data: { sections: { personal: { title: string; fullName: string; phone: string; email: string }; professional: { title: string; company: string; jobTitle: string }; industry: { title: string; label: string; placeholder: string; options: IndustryOption[] }; additional: { title: string; label: string; placeholder: string }; }; submit: { label: string; disclaimer: string }; }; }) { const industries = useMemo(() => data.sections.industry.options, [data.sections.industry.options]); const [form, setForm] = useState(emptyRegistration); const [submitState, setSubmitState] = useState<"idle" | "sending" | "ok" | "error">("idle"); return (
); }