@props(['widget' => []]) @php $w = is_array($widget) ? $widget : []; $direction = $w['deltaDirection'] ?? 'flat'; $deltaClass = match ($direction) { 'up' => 'mec-kpi-delta--up', 'down' => 'mec-kpi-delta--down', default => 'mec-kpi-delta--flat', }; $arrow = match ($direction) { 'up' => '▲', 'down' => '▼', default => '•', }; $width = (int) ($w['sparklineWidth'] ?? 200); $height = (int) ($w['sparklineHeight'] ?? 48); $color = $w['sparklineColor'] ?? '#138476'; @endphp
merge(['class' => 'mec-chart-panel mec-kpi-sparkline-panel']) }}>

{{ $w['title'] ?? '' }}

@if(!empty($w['subtitle']))

{{ $w['subtitle'] }}

@endif
{{ $w['kpi'] ?? '—' }} {{ $w['deltaLabel'] ?? '0%' }}
@if(!empty($w['sparklinePath'])) @endif