@props([ 'label' => '', 'value' => '', 'icon' => null, 'iconClass' => 'size-5', 'iconBg' => 'bg-primary/10', 'iconColor' => 'text-primary', 'trend' => null, 'trendUp' => null, 'trendLabel' => null, 'suffix' => null, 'prefix' => null, 'loading' => false, 'compact' => false, 'href' => null, 'clickable' => false, ]) @php $cardClasses = 'bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 shadow-sm transition-all duration-200'; if ($href || $clickable) { $cardClasses .= ' hover:shadow-md hover:border-gray-300 dark:hover:border-gray-700 cursor-pointer'; } $paddingClasses = $compact ? 'p-4' : 'p-5'; // Determine trend styling $trendClasses = ''; $trendIcon = null; if ($trendUp === true) { $trendClasses = 'text-success'; $trendIcon = 'ri-arrow-up-line'; } elseif ($trendUp === false) { $trendClasses = 'text-danger'; $trendIcon = 'ri-arrow-down-line'; } else { $trendClasses = 'text-base/50'; $trendIcon = 'ri-subtract-line'; } @endphp @if($href) merge(['class' => $cardClasses . ' ' . $paddingClasses . ' block']) }}> @else
merge(['class' => $cardClasses . ' ' . $paddingClasses]) }}> @endif
{{-- Label --}}

{{ $label }}

{{-- Value --}}
@if($prefix) {{ $prefix }} @endif @if($loading)
@else {{ $value }} @endif @if($suffix) {{ $suffix }} @endif
{{-- Trend --}} @if($trend !== null || $trendLabel)
@if($trendIcon) @endif @if($trend !== null) {{ $trend }} @endif @if($trendLabel) {{ $trendLabel }} @endif
@endif {{-- Slot for additional content --}} @if($slot->isNotEmpty())
{{ $slot }}
@endif
{{-- Icon --}} @if($icon)
@endif
@if($href)
@else
@endif