import type { AiEvidence } from "@dci/core";
import type { Metadata } from "next";
import Link from "next/link";
import { Breadcrumbs } from "@/components/entity/breadcrumbs";
import { SectionNav } from "@/components/entity/section-nav";
import { SourcesFooter } from "@/components/entity/sources-footer";
import { EventList } from "@/components/event-list";
import { AiFacilitiesTable } from "@/components/intelligence/ai/ai-facilities-table";
import { ApiNote, CoverageBar, HonestEmpty, MwFigure, PillLink, PublishedOnlyNote, ShareList } from "@/components/intelligence/shared";
import { ProjectList } from "@/components/project-list";
import { AiMark } from "@/components/ui/badge";
import { Page, PageHeader, Section } from "@/components/ui/card";
import { Metric, MetricCell, MetricRow } from "@/components/ui/metric";
import { ErrorState, OfflineNotice } from "@/components/ui/states";
import { api } from "@/lib/api";
import { fmtInt, fmtMw, fmtPct } from "@/lib/format";
import { AI_EVIDENCE_LABEL, STATUS_LABEL, statusVar } from "@/lib/labels";
import { routes } from "@/lib/routes";
import { pageMetadata } from "@/lib/seo";
export const revalidate = 120;
export const metadata: Metadata = pageMetadata({
title: "AI infrastructure",
description: "AI / HPC data centers and projects with their evidence level (confirmed, likely, associated), the project pipeline by stage, top operators, markets and countries — published figures only.",
path: routes.ai(),
});
const LEVELS: Array<{ level: AiEvidence; rule: string; counted: boolean }> = [
{ level: "confirmed", rule: "A source explicitly describes the site as AI / HPC / GPU / accelerated-computing infrastructure.", counted: true },
{ level: "likely", rule: "AI-ready, high-density, liquid- or direct-to-chip cooling or GPU signals in the source.", counted: true },
{ level: "associated", rule: "Only an AI tenant, customer or company mention — reported separately, NOT counted as AI infrastructure.", counted: false },
{ level: "unknown", rule: "No signal in any indexed source. A single keyword never confirms a site.", counted: false },
];
export default async function AiInfrastructurePage() {
const r = await api.aiIndex();
if (!r.ok) {
return (
{AI_EVIDENCE_LABEL[l.level].replace("AI · ", "").replace(/^./, (c) => c.toUpperCase())}.
{l.rule}
{LEVELS.map((l) => (
{stages.map((st) => (
)}
records = facilities + projects · MW = planned, published