"use client"; import SubmitToast from "@/app/components/ui/SubmitToast"; import { useMemo, useState } from "react"; type FeedbackJson = { sections: { satisfaction: { title: string; eventRating: { label: string; left: string; right: string; min: number; max: number }; venueSatisfaction: { label: string; left: string; right: string; min: number; max: number }; }; content: { title: string; session: { label: string; placeholder: string; options: { value: string; label: string }[] }; speakerRating: { label: string; left: string; right: string; min: number; max: number }; }; qualitative: { title: string; improve2027: { label: string; placeholder: string }; comments: { label: string; placeholder: string }; }; industry: { title: string; ipv6Readiness: { label: string; hint: string; left: string; right: string; min: number; max: number }; challenge: { label: string; hint: string; placeholder: string; options: { value: string; label: string }[]; }; }; networking: { title: string; introductions: { label: string; hint: string; placeholder: string }; collaboration: { label: string; hint: string; options: { value: string; label: string }[] }; }; logistics: { title: string; venueRating: { label: string; hint: string; left: string; right: string; min: number; max: number }; }; }; submit: { label: string; disclaimer: string }; }; function RadioScale({ name, label, left, right, min, max, value, onChange, }: { name: string; label: string; left: string; right: string; min: number; max: number; value: string; onChange: (v: string) => void; }) { const values = useMemo(() => { const out: number[] = []; for (let i = min; i <= max; i++) out.push(i); return out; }, [min, max]); return (