<script lang="ts">
  import { statusStyle } from '$lib/tasks'
  import type { Session } from '$lib/api'

  let { row }: { row: Session } = $props()

  const st = $derived(statusStyle(row))
</script>

<span class="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
  <span class="size-2 rounded-full {st.dot} {st.pulse ? 'animate-pulse' : ''}"></span>
  {st.label}
</span>
