import type React from 'react' import { EmptyState } from './EmptyState' interface HeatmapProps { cells: { count: number }[] max: number } // 12 weeks × 7 days = 84 cells. Layout: columns = weeks (left→right), rows = days (top→bottom). const WEEKS = 12 const DAYS = 7 const CELL_W = 18 const CELL_H = 9 const GAP_X = 2 const GAP_Y = 2 export function Heatmap({ cells, max }: HeatmapProps): React.JSX.Element { if (cells.length !== 84) { return } const svgW = WEEKS * (CELL_W + GAP_X) const svgH = DAYS * (CELL_H + GAP_Y) const safeMax = max > 0 ? max : 1 return ( {cells.map((cell, i) => { const week = Math.floor(i / DAYS) const day = i % DAYS const intensity = 0.1 + (cell.count / safeMax) * 0.85 return ( ) })} ) }