@props([ 'title', 'icon', 'data', 'valueKey', 'valueType', 'relationship' => null, 'formatValue' => null, ])
{{ $title }}
{{ __($title) }}
@forelse ($data as $index => $entry)
$index + 1 == 1, 'bg-[var(--color-text-muted)] text-[var(--button-text-color)] ring-2 ring-[var(--color-text-muted)] ring-offset-2 ring-offset-[var(--color-surface)]' => $index + 1 == 2, 'bg-[var(--color-accent)] text-white ring-2 ring-[var(--color-accent)] ring-offset-2 ring-offset-[var(--color-surface)]' => $index + 1 == 3, 'bg-[var(--color-background)] text-[var(--color-text-muted)]' => $index + 1 > 3, ])> {{ $index + 1 }}
@if($index + 1 <= 3)
{{ $index + 1 == 1 ? '🥇' : ($index + 1 == 2 ? '🥈' : '🥉') }}
@endif
$index + 1 == 1, 'border-[var(--color-text-muted)]' => $index + 1 == 2, 'border-[var(--color-accent)]' => $index + 1 == 3, 'border-[var(--color-text-muted)] group-hover:border-[var(--color-primary)]' => $index + 1 > 3, ]) src="{{ setting('avatar_imager') }}{{ $relationship ? $entry->{$relationship}?->look : $entry->look }}&size=b&head_direction=2&gesture=sml&headonly=1" alt="" /> @if($index + 1 == 1)
👑
@endif

{{ $relationship ? $entry->{$relationship}?->username : $entry->username }}

$index + 1 == 1, 'text-[var(--color-text-muted)]' => $index + 1 > 1, ])> {{ $formatValue ? $formatValue($entry->{$valueKey}) : $entry->{$valueKey} }} {{ $valueType }}

@if($index + 1 == 1)
🏆
@elseif($index + 1 <= 3)
@endif
@empty
📊

No data available

@endforelse