@php
$tag = $attributes['type'] && $attributes['type'] == 'link' ? 'a' : 'button';
$icon = $attributes['icon'] ?? false;
$label = $attributes['label'] ?? false;
$withIconRight = $attributes['withIconRight'] ?? false;
@endphp
<{{ $tag }}
{{ $attributes->merge(['class' => 'border-transparent w-full bg-transparent hover:bg-gray-200 transition text-left py-2 px-4 flex items-center']) }}>
@if ($icon)
{{ $icon }}
@endif
@if ($label)
{{ $label }}
@endif
@if ($withIconRight)
>
@endif
{{ $tag }}>