import { Show } from "solid-js"
import { getWorkerStats } from "@/saeeol/worker"

export function WorkerStatus() {
  const stats = getWorkerStats
  const s = () => stats()

  return (
    <text fg="gray">
      {" "}■{s().running} □{s().queued} ✓{s().done}
      <Show when={s().error > 0}> ✕{s().error}</Show>
      {" "}
    </text>
  )
}
