import React from 'react'; import { AlertCircle, AlertTriangle, Zap, CheckCircle, Clock } from 'lucide-react'; type BadgeType = 'critical' | 'warning' | 'info' | 'success' | 'priority'; type PriorityLevel = 'high' | 'medium' | 'low'; type ImpactLevel = 'high' | 'medium' | 'low'; interface BadgePillProps { type?: BadgeType; priority?: PriorityLevel; impact?: ImpactLevel; label: string; size?: 'sm' | 'md' | 'lg'; } const BadgePill: React.FC = ({ type, priority, impact, label, size = 'md' }) => { // Determinamos el estilo basado en el tipo let bgColor = 'bg-slate-100'; let textColor = 'text-slate-700'; let borderColor = 'border-slate-200'; let icon = null; // Por tipo (crítico, warning, info) if (type === 'critical') { bgColor = 'bg-red-100'; textColor = 'text-red-700'; borderColor = 'border-red-300'; icon = ; } else if (type === 'warning') { bgColor = 'bg-amber-100'; textColor = 'text-amber-700'; borderColor = 'border-amber-300'; icon = ; } else if (type === 'info') { bgColor = 'bg-blue-100'; textColor = 'text-blue-700'; borderColor = 'border-blue-300'; icon = ; } else if (type === 'success') { bgColor = 'bg-green-100'; textColor = 'text-green-700'; borderColor = 'border-green-300'; icon = ; } // Por prioridad if (priority === 'high') { bgColor = 'bg-rose-100'; textColor = 'text-rose-700'; borderColor = 'border-rose-300'; icon = ; } else if (priority === 'medium') { bgColor = 'bg-orange-100'; textColor = 'text-orange-700'; borderColor = 'border-orange-300'; icon = ; } else if (priority === 'low') { bgColor = 'bg-slate-100'; textColor = 'text-slate-700'; borderColor = 'border-slate-300'; } // Por impacto if (impact === 'high') { bgColor = 'bg-purple-100'; textColor = 'text-purple-700'; borderColor = 'border-purple-300'; icon = ; } else if (impact === 'medium') { bgColor = 'bg-cyan-100'; textColor = 'text-cyan-700'; borderColor = 'border-cyan-300'; } else if (impact === 'low') { bgColor = 'bg-teal-100'; textColor = 'text-teal-700'; borderColor = 'border-teal-300'; } // Tamaños let paddingClass = 'px-2.5 py-1'; let textClass = 'text-xs'; if (size === 'sm') { paddingClass = 'px-2 py-0.5'; textClass = 'text-xs'; } else if (size === 'md') { paddingClass = 'px-3 py-1.5'; textClass = 'text-sm'; } else if (size === 'lg') { paddingClass = 'px-4 py-2'; textClass = 'text-base'; } return ( {icon} {label} ); }; export default BadgePill;