import InteractiveInvestmentMap, { type InvestmentMapArea, type InvestmentMapFeature, type InvestmentMapKind, } from './interactive-investment-map'; import { TerritoryGeometryDetails } from './territory-geometry-preview'; import { useTerritoryGeometry } from './use-territory-geometry'; const noAreas: InvestmentMapArea[] = []; export default function CatalogueInvestmentMap({ points, areas = noAreas, territoryId, mapKind, }: { points: InvestmentMapFeature[] | null; areas?: InvestmentMapArea[]; territoryId?: string; mapKind?: InvestmentMapKind; }) { const { context, error } = useTerritoryGeometry( territoryId, undefined, true, ); return ( ) : undefined } notice={ territoryId ? ( <> {error && (

{error} Os restantes dados do mapa continuam disponíveis.

)} {!context && !error && (

A carregar limites administrativos…

)} {context && !context.selected_geometry_available && (

Sem limite administrativo acessível para o território seleccionado. {context.areas.length > 0 ? ' Os limites disponíveis são contexto administrativo e não substituem o limite da selecção.' : ''}

)} {context?.truncated && (

Cobertura administrativa incompleta: são consultadas até 100 geometrias e 500 subdivisões.

)} ) : undefined } /> ); }