import { cn, getStatusColor } from '@/lib/utils';

interface BadgeProps {
  children: React.ReactNode;
  variant?: 'default' | 'status';
  status?: string;
  className?: string;
}

export default function Badge({ children, variant = 'default', status, className }: BadgeProps) {
  const baseClasses = 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium';
  
  if (variant === 'status' && status) {
    return (
      <span className={cn(baseClasses, getStatusColor(status), className)}>
        {children}
      </span>
    );
  }

  return (
    <span className={cn(baseClasses, 'bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300', className)}>
      {children}
    </span>
  );
}
