{{-- Props: - icon: string — clase del icono (bi-*, fa-*, ki-*) - value: string|int — número/texto destacado - label: string — etiqueta uppercase pequeña - color: string — bootstrap color (primary|danger|success|warning|info|secondary|dark) - href: ?string — si está, la card es clickeable - accent: bool — si true, agrega border 2px del color (para destacar) - sublabel: ?string — segunda línea opcional bajo el label Pattern: command.blade.php líneas 64-122 --}} @props([ 'icon' => 'bi-archive', 'value' => '0', 'label' => 'Total', 'color' => 'gray-700', 'href' => null, 'accent' => false, 'sublabel' => null, ]) @php $tag = $href ? 'a' : 'div'; $attrs = $href ? "href=\"{$href}\" class=\"text-decoration-none\"" : ''; $accentStyle = $accent ? "border: 2px solid var(--bs-{$color});" : 'border: 0;'; $iconColor = in_array($color, ['gray-700', 'gray-600', 'secondary'], true) ? 'text-gray-700' : "text-{$color}"; $valueColor = $accent ? "text-{$color}" : 'text-dark'; @endphp <{!! $tag !!} {!! $attrs !!} class="card shadow-sm h-100 d-block {{ $href ? 'kpi-deluxe-link' : '' }}" style="border-radius: 12px; {{ $accentStyle }} transition: transform 0.15s ease, box-shadow 0.15s ease;">