@props(['label', 'value', 'change' => null, 'icon', 'color' => 'indigo']) @php $iconBoxClass = match ($color) { 'emerald' => 'icon-box-emerald', 'amber' => 'icon-box-amber', 'red' => 'icon-box-red', 'violet' => 'icon-box-violet', 'cyan' => 'icon-box-cyan', default => 'icon-box-indigo', }; $trendClass = $change === null ? 'text-slate-500' : ($change >= 0 ? 'text-emerald-400' : 'text-rose-400'); $trendPrefix = $change === null ? '' : ($change >= 0 ? '+' : ''); @endphp
merge(['class' => 'stat-card']) }}>

{{ $label }}

{{ $value }}

@if ($change !== null)

{{ $trendPrefix }}{{ $change }}% vs previous period

@endif