'use client' import * as React from 'react' import { cn } from '../../lib/utils' import { resolveSessionStatus } from './status' import type { SessionStatusKind } from './types' export interface SessionStatusBadgeProps { /** Explicit status kind. If omitted, derived from `isActive`. */ status?: SessionStatusKind /** Human label. Defaults from the resolved kind. */ label?: string /** Fallback when `status` is absent. */ isActive?: boolean /** Show the leading state dot. Default true. */ showDot?: boolean className?: string } /** * A generic session status pill. Colour + label come from `resolveSessionStatus` * using tailwind tokens — no app-specific palette. (Named `SessionStatusBadge` to * avoid the existing `StatusBadge` export in `../badge`.) */ export function SessionStatusBadge({ status, label, isActive = false, showDot = true, className, }: SessionStatusBadgeProps) { const resolved = resolveSessionStatus({ status, statusLabel: label, isActive }) const isLive = resolved.kind === 'active' return ( {showDot && ( ) }