@props([ 'href' => '#', 'label' => '', // dark | light | outline | ghost (ghost renders as btn-pill--ghost-light) 'variant' => 'light', 'external' => false, ]) @php $modifier = match ($variant) { 'ghost', 'ghost-light', 'outline-light' => 'btn-pill--ghost-light', 'outline' => 'btn-pill--outline', 'dark' => 'btn-pill--dark', default => 'btn-pill--light', }; @endphp {{-- The @if stays on this line: a newline before it lands inside the opening tag and breaks a byte comparison against the legacy markup. --}} class(['btn-pill', $modifier]) }}@if ($external) target="_blank" rel="noopener noreferrer"@endif> {{ $label !== '' ? $label : $slot }}