import { useRef, useState } from "react"; import { Link } from "@inertiajs/react"; import type { FormEvent } from "react"; import { newSubmissionKey } from "@/lib/portal-api"; import { Frame, Field, button, card, input } from "./shared"; type Opportunity = { id: string; slug: string; title: string; sector?: { name: string } | null }; type Props = { record: Opportunity; modalities: string[]; returnUrl?: string }; type Form = { fullName: string; email: string; phone: string; investorType: string; country: string; sectorInterest: string; modality: string; investmentRange: string; message: string; privacyConsent: boolean; shareWithProponent: boolean; }; export default function BusinessInterest({ record, modalities, returnUrl = "/negocios" }: Props) { const [form, setForm] = useState