@php
$tag = $href ? 'a' : 'button';
$personalize = $classes();
@endphp
<{{ $tag }} @if ($href) href="{{ $href }}" @else role="button" @endif {{ $attributes->except('type')->class([
$personalize['wrapper.base'],
$personalize['wrapper.sizes.' . $size],
$colors['background']
]) }} type="{{ $attributes->get('type', 'button') }}" @if ($livewire && $loading) wire:loading.attr="disabled" wire:loading.class="!cursor-wait" @endif>
@if ($icon)
@else
{{ $text ?? $slot }}
@endif
@if ($livewire && $loading)
@endif
{{ $tag }}>