import { Head, usePage } from '@inertiajs/react'; import type { ReactNode } from 'react'; export { button, control, Field, Pagination } from '../management/shared'; export type Dossier = { id: string; title: string; source: string; content: Record; project_id: string | null; cluster_id: string | null; corridor_id: string | null; publication_status: string; version_no?: number; }; export const labels: Record = { description: 'Visão e proposta de valor', location: 'Território', region: 'Região', sector: 'Sector', promotion: 'Promoção', facts: 'Dados indicativos da fonte', partners: 'Investidores e parceiros', cta: 'Próxima acção', anchors: 'Projectos âncora e oportunidades', gaps: 'Lacunas da cadeia de valor', priority: 'Prioridade proposta na matriz', clusters: 'Clusters associados', focus: 'Investimentos complementares', notice: 'Estado de validação', code: 'Código', }; export const kind = ( r: Pick, ) => r.corridor_id ? 'Corredor' : r.cluster_id ? 'Cluster' : 'Projecto âncora'; export function Layout({ title, children, mainLandmark = true, }: { title: string; children: ReactNode; mainLandmark?: boolean; }) { const { flash } = usePage<{ flash?: { success?: string } }>().props; const Container = mainLandmark ? 'main' : 'div'; return (

{title}

{flash?.success && (

{flash.success}

)} {children}
); }