'use client' import { LucideIcon, TrendingUp, TrendingDown } from 'lucide-react' import { formatCurrency } from '@/lib/utils' import { cn } from '@/lib/utils' interface MetricCardProps { title: string amount: number subtitle?: string trend?: { value: number isPositive: boolean } icon: LucideIcon color?: string } export function MetricCard({ title, amount, subtitle, trend, icon: Icon, color = 'text-emerald-400', }: MetricCardProps) { return (
{/* Icono en esquina superior derecha */}
{/* Contenido */}
{/* Título */}

{title}

{/* Monto */}

{formatCurrency(amount)}

{/* Subtítulo */} {subtitle && (

{subtitle}

)} {/* Indicador de tendencia */} {trend && (
{trend.isPositive ? ( <> +{trend.value}% ) : ( <> -{trend.value}% )} vs mes anterior
)}
) }