@props([ 'title', 'value', 'hint' => null, 'info' => null, 'tone' => 'primary', // primary|success|warning|info|muted|danger 'href' => null, 'linkLabel' => null, 'spark' => 'bars', // bars|line|ring|none 'trend' => 'up', // up|down|flat|none ]) @php $tones = [ 'primary' => [ 'hint' => '#EA580C', 'spark' => '#FB923C', 'sparkSoft' => '#FED7AA', 'sparkActive' => '#EA580C', ], 'success' => [ 'hint' => '#059669', 'spark' => '#34D399', 'sparkSoft' => '#A7F3D0', 'sparkActive' => '#059669', ], 'warning' => [ 'hint' => '#D97706', 'spark' => '#FBBF24', 'sparkSoft' => '#FDE68A', 'sparkActive' => '#D97706', ], 'info' => [ 'hint' => '#0284C7', 'spark' => '#38BDF8', 'sparkSoft' => '#BAE6FD', 'sparkActive' => '#0284C7', ], 'muted' => [ 'hint' => '#64748B', 'spark' => '#94A3B8', 'sparkSoft' => '#E2E8F0', 'sparkActive' => '#64748B', ], 'danger' => [ 'hint' => '#E11D48', 'spark' => '#FB7185', 'sparkSoft' => '#FECDD3', 'sparkActive' => '#E11D48', ], ]; $t = $tones[$tone] ?? $tones['primary']; $barHeights = [42, 62, 48, 78, 58, 92, 70]; $trend = in_array($trend, ['up', 'down', 'flat', 'none'], true) ? $trend : 'up'; @endphp
merge(['class' => 'nursery-card nursery-admina-stat']) }} style="--spark: {{ $t['spark'] }}; --spark-soft: {{ $t['sparkSoft'] }}; --spark-active: {{ $t['sparkActive'] }}; --hint: {{ $t['hint'] }};">

{{ $title }}

@if($info) @endif
@if(filled($href)) @endif
{{-- RTL: العنصر الأول يمين = البيانات، الثاني شمال = الرسمة --}}

{{ $value }}

@if($hint)

@if($trend === 'up') @elseif($trend === 'down') @elseif($trend === 'flat') @endif {{ $hint }}

@endif @if(filled($href) && filled($linkLabel)) {{ $linkLabel }} @endif
@if($spark === 'bars') @elseif($spark === 'line') @elseif($spark === 'ring') @endif