@props([ 'tone' => 'neutral', 'pill' => true, 'icon' => null, 'dot' => false, ]) @php $toneClass = match($tone) { 'success' => 'badge--success', 'warning' => 'badge--warning', 'danger' => 'badge--danger', 'info' => 'badge--info', 'primary' => 'badge--primary', 'muted' => 'badge--muted', default => 'badge--neutral', }; $classes = trim('badge ' . $toneClass . ($pill ? ' badge--pill' : '')); @endphp merge(['class' => $classes]) }}> @if($dot)@endif @if($icon){!! icon($icon) !!}@endif {{ $slot }}