@props(['size' => 'medium', 'icon' => null, 'iconOnly' => false, 'label' => null, 'href' => null,'type' => 'button','id' => rand()])

@php
    $tag = $href ? 'a' : 'button';
    $classes = 'btn-' . $size . ' btn-prod-text';
    if ($iconOnly) $classes .= ' btn-icon';
    if ($label) $classes .= ' btn-prod-label';
@endphp

<{{ $tag }} {{ $attributes->merge(['class' => $classes, 'data-label' => $label, 'href' => $href,'type' => $type,'id' => $id]) }}>
    @if($icon)<i class="{{ $icon }}"></i>@endif
    {{ $slot }}
</{{ $tag }}>