import { useInterestDraft } from '@/hooks/use-interest-draft'; 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'; import CountrySelect, { type Country } from '@/components/country-select'; import { businessModalities } from './business-types'; type Opportunity = { id: string; slug: string; title: string; sector?: { name: string } | null; }; type Props = { record: Opportunity; modalities: string[]; returnUrl?: string; countries: Country[]; }; type Form = { declared_origin_country_code: string; 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', countries, }: Props) { const draft = useInterestDraft