import { PublicDocumentContent, type PublicDocument, } from '@/components/public-document-content'; import { Head, Link, useForm, usePage } from '@inertiajs/react'; import { useState } from 'react'; import { PortalMenu } from '@/layouts/portal-navigation'; import { newSubmissionKey } from '@/lib/portal-api'; import { ProvinceSelect } from '@/components/investment-territory'; import { SimulationForm } from '@/components/simulation-form'; import { InvestmentRoadmap } from '@/components/investment-roadmap'; import { JourneyDocumentResources } from '@/components/journey-document-resources'; import SectorEntry, { type SectorEntryData } from '@/components/sector-entry'; import CountrySelect, { type Country } from '@/components/country-select'; const input = 'box-border w-full min-w-0 max-w-full rounded-lg border border-slate-300 bg-white p-3 text-slate-900'; const button = 'inline-block rounded-lg bg-emerald-800 px-5 py-3 font-semibold text-white disabled:opacity-50'; const titles: Record = { sectors: 'Sectores Prioritários', sector: 'Sector prioritário', procedures: 'Como Investir em Moçambique', legislation: 'Legislação e Incentivos', documents: 'Documentos e Formulários', support: 'Apoio ao Investidor', partnerships: 'Bolsa de Parcerias', simulator: 'Simulador Fiscal', investor: 'Formulário de investidor', company: 'Formulário de empresa', desk: 'Balcão Virtual', }; const documentTypeLabels: Record = { legislation: 'Legislação', procedure: 'Procedimento oficial', official_form: 'Formulário oficial', digital_adaptation: 'Adaptação digital de formulário', guidance_template: 'Modelo orientativo', guide: 'Guia', study: 'Estudo', reference_data: 'Dados de referência', unknown: 'Tipo por classificar', }; const legalStatusLabels: Record = { not_applicable: 'Não aplicável', in_force: 'Vigência indicada; confirme o período', historical: 'Histórico', proposed: 'Proposta; não é norma vigente', repealed: 'Revogada', amended: 'Alterada; consulte alterações posteriores', unknown: 'Por confirmar', }; type Resource = PublicDocument & { document_type: string }; type Partnership = { id: number; title: string; sector: string; province: string; offer: string; seeking: string; }; type Page = { data: T[]; prev_page_url: string | null; next_page_url: string | null; total: number; }; type Props = { sectorEntry?: SectorEntryData; countries?: Country[]; section: string; filters?: Record; sectors?: { name: string; slug: string; short_description: string; opportunities_count: number; specializations?: { id: number; name: string; url: string }[]; }[]; sector?: { id: number; name: string; slug: string; description: string; short_description: string; }; opportunities?: { title: string; slug: string; province: string; summary: string; }[]; resources?: Page; categories?: string[]; topics?: string[]; documentTypes?: string[]; languages?: string[]; issuers?: string[]; legalStatuses?: string[]; territories?: { id: string; name: string; location_type: string; parent_id: string | null; }[]; activities?: string[]; stages?: string[]; modules?: string[]; partnerships?: Page; contacts?: { email?: string; phone?: string; address?: string; hours?: string; }; requests?: { reference: string; status: string; created_at: string; metadata: { kind: string }; }[]; myPartnerships?: { id: number; title: string; status: string }[]; }; const states: Record = { received: 'Recebido', in_review: 'Em análise', contacted: 'Contactado', closed: 'Encerrado', pending: 'A aguardar publicação', published: 'Publicado', withdrawn: 'Retirado', }; function Pagination({ page }: { page: Page }) { return ( ); } function RequestForm({ kind, partnershipId, }: { kind: string; partnershipId?: number; }) { const { auth } = usePage<{ auth: { user: { name: string; email: string } | null }; }>().props; const countries = usePage<{ countries?: Country[] }>().props.countries ?? []; const form = useForm({ kind, fullName: auth.user?.name ?? '', email: auth.user?.email ?? '', phone: '', country: '', declared_origin_country_code: '', company: '', sectorInterest: '', message: '', privacyConsent: false, submission_key: '', partnership_id: partnershipId ?? null, }); const [sent, setSent] = useState(false); return (
{ e.preventDefault(); const key = form.data.submission_key || newSubmissionKey(); form.setData('submission_key', key); form.transform((data) => ({ ...data, submission_key: key })); form.post('/apoio', { preserveScroll: true, onSuccess: () => setSent(true), }); }} >

{kind === 'company' ? 'Dados da empresa e do representante' : 'Enviar pedido'}

{!auth.user && (

Pode enviar sem conta. Para acompanhar no Balcão Virtual,{' '} entre antes de enviar .

)} {( [ 'fullName', 'email', 'phone', 'country', 'sectorInterest', ...(kind === 'company' ? ['company'] : []), ] as const ).map((key) => { const field = key as | 'fullName' | 'email' | 'phone' | 'country' | 'sectorInterest' | 'company'; const labels = { fullName: 'Nome do representante', email: 'Email', phone: 'Telefone (opcional)', country: 'País', sectorInterest: 'Sector ou assunto', company: 'Nome da empresa', }; return ( ); })}

Origem opcional e independente do país acima. Sem declaração, permanece não informado nas estatísticas.