import * as React from 'react';
import { cn } from '@/lib/helper';

export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
  variant?: 'default' | 'success' | 'secondary' | 'destructive' | 'outline';
}

function Badge({ className, variant = 'default', ...props }: BadgeProps) {
  return (
    <div
      className={cn(
        'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
        {
          'bg-blue-100 text-blue-700': variant === 'default',
          'bg-green-100 text-green-700': variant === 'success',
          'bg-gray-100 text-gray-700': variant === 'secondary',
          'bg-red-100 text-red-700': variant === 'destructive',
          'border border-gray-200 text-gray-700': variant === 'outline',
        },
        className
      )}
      {...props}
    />
  );
}

export { Badge };
