import Link from "next/link"; import { CornerBrackets } from "./CornerBrackets"; import { ClassificationStrip } from "./ClassificationStrip"; import { LedgerRow, type ReadoutCell } from "./LedgerRow"; import { NoticeState } from "./NoticeState"; import { ProvenanceChip } from "./ProvenanceChip"; import { DOSSIER } from "./tokens"; import type { SurfaceOverview } from "@/lib/operations/surface"; const cell = "px-3 py-2 align-middle text-xs"; const headCell = "px-3 py-2 text-left font-mono text-[9px] uppercase tracking-widest text-white/50"; function CardShell({ title, children, }: { title: string; children: React.ReactNode; }) { return (
); } export function RecentOperationsCard({ operations }: { operations: SurfaceOverview["recentOperations"] }) { return ( {operations.length === 0 ? ( ) : ( {operations.map((op) => ( ))}
Operation Events Applied Failed Rejected Last activity
{op.operationId} {op.eventCount} {op.appliedCount} {op.failedCount} {op.rejectedCount} {op.lastOccurredAt ?? "n/a"}
)}
); } export function MyExtractionsCard({ extractions, signedIn, }: { extractions: SurfaceOverview["myExtractions"]; signedIn: boolean; }) { if (!signedIn) { return ( ); } return ( {extractions.length === 0 ? ( ) : ( )} ); } export function ReservationsCard({ reservations, canSee, }: { reservations: SurfaceOverview["activeReservations"]; canSee: boolean; }) { if (!canSee) { return ( ); } return ( {reservations.length === 0 ? ( ) : ( )} ); } export function ReadinessCard({ readiness, canSee, }: { readiness: SurfaceOverview["ownReadiness"]; canSee: boolean; }) { if (!canSee) { return ( ); } return ( {readiness === null ? ( ) : (

{readiness.score ?? "n/a"}

{readiness.explanation &&

{readiness.explanation}

} {readiness.windowLabel && (

Window {readiness.windowLabel}

)}
)}
); } export function PressureCard({ pressure, canSee, }: { pressure: SurfaceOverview["pressure"]; canSee: boolean; }) { if (!canSee) { return ( ); } return ( {pressure.length === 0 ? ( ) : ( )} ); } export function OperationsStrip({ left }: { left: string }) { return ; }