@php $tag = $attributes['type'] && $attributes['type'] == 'link' ? 'a' : 'button'; $disabled = isset($attributes['disabled']) && $attributes['disabled'] ?? false; $classes = 'bg-green-500 text-white font-semibold py-1 px-2 rounded text-sm transition'; if ($disabled) { $classes .= ' select-none opacity-60 cursor-default'; $attributes['disabled'] = true; } else { $classes .= ' hover:bg-green-600'; $attributes['disabled'] = false; } @endphp <{{ $tag }} {{ $attributes->merge(['class' => $classes]) }}> {{ $attributes['label'] ?? trans('Button label') }}