import type { FacilitySummary } from "@dci/core"; import Link from "next/link"; import { AiMark, EstimateMark, StatusBadge } from "@/components/ui/badge"; import { CountryFlag } from "@/components/ui/country-flag"; import { RowLink, TBody, THead, Table, Td, Th, Tr } from "@/components/ui/table"; import { HonestEmpty } from "@/components/intelligence/shared"; import { bestMw, fmtMw } from "@/lib/format"; import { AI_EVIDENCE_LABEL } from "@/lib/labels"; import { routes } from "@/lib/routes"; /** AI / HPC facilities with the evidence level per row (confirmed / likely / associated / unknown). */ export function AiFacilitiesTable({ items }: { items: FacilitySummary[] }) { if (!items.length) return ; return ( {items.map((f) => { const { mw, kind } = bestMw(f); const ev = f.aiEvidence ?? "unknown"; return ( ); })}
Facility Operator Market Country Status Capacity Evidence
{f.name}
{f.operator?.name ?? "Operator unknown"}
{f.operator ? ( {f.operator.name} ) : ( โ€” )} {f.metro ? ( {f.metro.name} ) : ( (f.city ?? "โ€”") )} {mw === null ? ( โ€” ) : ( {(f.mwIsEstimate || kind === "planned") && } {fmtMw(mw)} )} {ev === "unknown" ? ( flagged AI ยท evidence level unknown ) : ( )}
); }