import type { CSSProperties } from "react"; import type { DpsMeterSnapshot } from "../game/dpsMeter"; import "./dpsMeter.css"; export function DpsMeterWidget({ snapshot, width, compact = false }: { snapshot: DpsMeterSnapshot; width?: number | null; compact?: boolean; }) { const number = (value: number) => Math.round(value).toLocaleString(); return
DPS{snapshot.rows.length === 0 ? "Waiting for combat" : snapshot.active ? "Current fight" : "Last fight"} {Math.floor(snapshot.durationSeconds / 60)}:{String(Math.floor(snapshot.durationSeconds % 60)).padStart(2, "0")}
{snapshot.rows.length > 0 ?
    {snapshot.rows.map((row) =>