import React from 'react';
import { cn } from '@/lib/utils';
import { TrendingUp, TrendingDown, Minus } from 'lucide-react';
/**
* DashboardKPICard - Versão de Produção
* Componente de alta fidelidade visual para exibição de KPIs.
*/
export const DashboardKPICard = ({
label,
value,
subtitle,
trend,
trendDirection = 'stable',
icon: Icon,
color = 'blue',
className
}) => {
// Mapeamento de cores para bordas e backgrounds de ícones
const colorStyles = {
blue: {
border: 'border-l-[#3b82f6]',
iconBg: 'bg-gradient-to-br from-[#3b82f6] to-[#1d4ed8]',
iconShadow: 'shadow-[#3b82f6]/20'
},
green: {
border: 'border-l-[#10b981]',
iconBg: 'bg-gradient-to-br from-[#10b981] to-[#059669]',
iconShadow: 'shadow-[#10b981]/20'
},
orange: {
border: 'border-l-[#f59e0b]',
iconBg: 'bg-gradient-to-br from-[#f59e0b] to-[#d97706]',
iconShadow: 'shadow-[#f59e0b]/20'
},
red: {
border: 'border-l-[#ef4444]',
iconBg: 'bg-gradient-to-br from-[#ef4444] to-[#b91c1c]',
iconShadow: 'shadow-[#ef4444]/20'
},
workspace: {
border: 'border-l-[#26b1c7]',
iconBg: 'bg-gradient-to-br from-[#26b1c7] to-[#003153]',
iconShadow: 'shadow-[#26b1c7]/20'
}
};
const style = colorStyles[color] || colorStyles.blue;
// Estilos para a badge de tendência
const trendStyles = {
up: {
text: 'text-[#10b981]',
bg: 'bg-[#10b981]/10',
icon:
{subtitle}
)}