(defcomp
  (&key stats)
  (let-match
    {:lines lines :io-count io-count :render-count render-count :pure-count pure-count :mutation-count mutation-count :test-total test-total :total-defines total-defines}
    stats
    (div
      (~tw :tokens "flex flex-wrap gap-2 mb-6 text-xs")
      (span
        (~tw
          :tokens "bg-stone-100 text-stone-600 px-2 py-0.5 rounded font-medium")
        (str total-defines " defines"))
      (when
        (> pure-count 0)
        (span
          (~tw :tokens "bg-green-100 text-green-700 px-2 py-0.5 rounded")
          (str pure-count " pure")))
      (when
        (> mutation-count 0)
        (span
          (~tw :tokens "bg-amber-100 text-amber-700 px-2 py-0.5 rounded")
          (str mutation-count " mutation")))
      (when
        (> io-count 0)
        (span
          (~tw :tokens "bg-orange-100 text-orange-700 px-2 py-0.5 rounded")
          (str io-count " io")))
      (when
        (> render-count 0)
        (span
          (~tw :tokens "bg-sky-100 text-sky-700 px-2 py-0.5 rounded")
          (str render-count " render")))
      (when
        (> test-total 0)
        (span
          (~tw :tokens "bg-violet-100 text-violet-700 px-2 py-0.5 rounded")
          (str test-total " tests")))
      (span
        (~tw :tokens "bg-stone-100 text-stone-500 px-2 py-0.5 rounded")
        (str lines " lines")))))
