{title}
{flash?.warning && ({flash.warning}
)} {flash?.success && ({flash.success}
)} {children}import { Head, Link, usePage } from '@inertiajs/react'; import type { ReactNode } from 'react'; import { PortalMenu } from '@/layouts/portal-navigation'; import type { StructureGeography } from '@/components/structure-geography'; export type Option = { id: number; group: string; code: string; label: string; active: boolean; requires_description: boolean; sort_order: number; }; export type Entity = { id: string; name: string; dossiers?: { id: string; title: string; source: string }[]; geography?: StructureGeography | null; }; export type References = { zones?: { id: string; name: string; category: string }[]; options: Option[]; clusters: Entity[]; corridors: Entity[]; projects: Entity[]; locations: Entity[]; sectors: { id: number; name: string; slug: string }[]; }; export type Opportunity = { id: number; title: string; slug: string; reference: string; summary: string | null; description: string | null; province: string | null; district: string | null; sector?: { name: string; slug: string }; estimated_investment_amount: string | null; estimated_investment_currency: string; maturity_label: string | null; promoter_name: string | null; expected_impact: string | null; financing_modality: string | null; status: string; last_validated_at?: string | null; }; export type Context = { primary_territory_path?: { id: string; name: string; location_type: string; }[]; zones?: { id: string; name: string; category: string; association_type: string; source_reference: string; }[]; profile: { version: number; is_education: boolean; business_model: string | null; requirements: string | null; risks: string | null; target_date: string | null; source_reference: string | null; } | null; facets: { id: number; group: string; label: string }[]; clusters: Entity[]; corridors: Entity[]; projects: Entity[]; locations: Entity[]; }; export const input = 'w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-slate-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-emerald-700'; export const button = 'inline-flex items-center justify-center rounded-lg bg-emerald-800 px-4 py-2 font-semibold text-white disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-emerald-700'; export const card = 'rounded-xl border border-slate-200 bg-white p-5 shadow-sm'; export function Frame({ title, children, }: { title: string; children: ReactNode; }) { const { flash } = usePage<{ flash?: { success?: string; warning?: string }; }>().props; return (
{flash.warning}
)} {flash?.success && ({flash.success}
)} {children}