import { cn } from '@/lib/utils'
import type { OperationType } from '@/types'
import { RefreshCw, Sparkles } from 'lucide-react'

interface OperationTypeBadgeProps {
  type: OperationType
  className?: string
}

export function OperationTypeBadge({ type, className }: OperationTypeBadgeProps) {
  if (type === 'renovacion') {
    return (
      <span className={cn(
        'inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold',
        'bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400',
        className
      )}>
        <RefreshCw size={10} />
        Renovación
      </span>
    )
  }
  return (
    <span className={cn(
      'inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold',
      'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400',
      className
    )}>
      <Sparkles size={10} />
      Nuevo
    </span>
  )
}
