@php
if (empty($routeParams)) {
    $routeParams = [];
}

$target = $target ?? '_self';
@endphp

@if (isset($route))
    <a {{ isset($id) ? "id=$id" : '' }} target={{ $target }} class="btn {{ $class }}" href="{{ route($route, $routeParams) }}"><i data-feather="{{ $icon }}"></i> {{ isset($label) ? $label : '' }}</a>
@else
    <button {{ isset($id) ? "id=$id" : '' }} {{ isset($type) ? $type : 'submit' }} class="btn {{ $class }}" value="{{ isset($value) ? $value : '' }}"><i data-feather="{{ $icon }}"></i> {{ isset($label) ? $label : '' }}</button>
@endif