import type { HTMLAttributes, ReactNode } from "react"; export interface Metric { /** * Short label, e.g. "Requests/s", "p95 latency", "Error rate". */ label: string; /** * Pre-formatted value string, e.g. "1.2k", "182ms", "0.03%". * Consumer formats; the component does not parse. */ value: string; /** * Optional unit suffix appended after value with .9 opacity. */ unit?: string; /** * Optional change vs comparison period, e.g. "+12%", "-4ms", "+0.01pp". */ delta?: string; /** * If true, delta is "good" (success color); if false, "bad" (destructive). * If omitted, delta is rendered in muted (neutral). * * Caller decides semantics — "more requests" is good but "more errors" is bad. */ deltaGood?: boolean; /** * Optional sparkline data, 0..1 normalized. Consumer is responsible for normalization. */ sparkline?: number[]; /** * Optional onClick to drill into the metric. */ onClick?: () => void; /** * Optional override for the clickable tile's accessible name. When the * tile is interactive (`onClick` set), defaults to `View