import * as React from 'react' import { cn } from '../../lib/utils' export interface StatusBadgeConfig { label: string className: string } export interface StatusBadgeProps { status: T config: Record size?: 'sm' | 'md' className?: string /** Optional leading content (e.g. a status dot) rendered before the label. */ children?: React.ReactNode } const sizeClasses = { sm: 'px-2 py-0.5 text-xs', md: 'px-2.5 py-0.5 text-xs', } export function StatusBadge({ status, config, size = 'md', className, children, }: StatusBadgeProps) { const entry = config[status] if (!entry) { return ( {children} {status} ) } return ( {children} {entry.label} ) }