@props([ 'label', 'value', 'delta' => null, 'deltaLabel' => null, 'trend' => null, 'icon' => null, 'href' => null, 'tone' => 'primary', // primary | success | warning | info | error | secondary ]) @php $trendClass = match($trend) { 'up' => 'text-success', 'down' => 'text-error', 'flat' => 'text-base/60', default => 'text-base/60', }; $trendIcon = match($trend) { 'up' => 'ri-arrow-up-line', 'down' => 'ri-arrow-down-line', default => null, }; $toneBg = match($tone) { 'success' => 'bg-success/10 group-hover:bg-success/20', 'warning' => 'bg-warning/10 group-hover:bg-warning/20', 'info' => 'bg-info/10 group-hover:bg-info/20', 'error' => 'bg-error/10 group-hover:bg-error/20', 'secondary' => 'bg-secondary/10 group-hover:bg-secondary/20', default => 'bg-primary/10 group-hover:bg-primary/20', }; $toneText = match($tone) { 'success' => 'text-success', 'warning' => 'text-warning', 'info' => 'text-info', 'error' => 'text-error', 'secondary' => 'text-secondary', default => 'text-primary', }; $tag = $href ? 'a' : 'div'; @endphp <{{ $tag }} @if($href) href="{{ $href }}" wire:navigate @endif {{ $attributes->merge(['class' => 'card-glass card-glass-hover hover-lift block p-5 group']) }}>

{{ $label }}

{{ $value }}

@if($delta !== null || $deltaLabel)
@if($trendIcon) @endif @if($delta !== null){{ $delta }}@endif @if($deltaLabel){{ $deltaLabel }}@endif
@endif
@if($icon)
@endif
@isset($slot) @if(trim($slot) !== '')
{{ $slot }}
@endif @endisset