import React from 'react';
import { Badge } from '@/ui/Badge';

interface RatingBadgeProps {
  rating: number;
  ratingLabel: string;
  size?: 'sm' | 'md' | 'lg';
}

export function RatingBadge({ rating, ratingLabel, size = 'md' }: RatingBadgeProps) {
  const badgeSize = size === 'lg' ? 'md' : size;

  const getVariant = (val: number): 'warning' | 'primary' | 'success' | 'default' => {
    if (val >= 2500) return 'warning';
    if (val >= 2000) return 'primary'; // Simplified
    if (val >= 1500) return 'primary';
    if (val >= 1000) return 'success';
    return 'default';
  };

  return (
    <Badge 
      variant={getVariant(rating)}
      size={badgeSize} 
    >
      {ratingLabel}
    </Badge>
  );
}
