@if ($url ?? false)
    <a href="{{ $url }}">
@endif
<button type="{{ $type ?? 'button' }}" class="btn {{ $class ?? '' }}"
    @isset($style) style="{{ $style }}" @endisset
    @isset($id) id="{{ $id }}" @endisset
    @isset($data_id) data-id="{{ $data_id }}" @endisset
    @isset($dataId) data-id="{{ $dataId }}" @endisset
    @isset($title) title="{{ $title }}" data-toggle="tooltip" @endisset
    @isset($loading_text) data-loading-text="{{ $loading_text }}" @endisset
    @isset($loadingText) data-loading-text="{{ $loadingText }}" @endisset
    @isset($tooltip) data-toggle="tooltip" data-tooltip="{{ $tooltip }}" @endisset
    @isset($popover) data-toggle="popover" data-content="{{ $popover }}" @endisset
    @isset($placement) data-placement="{{ $placement ?? 'auto' }}" @endisset
    @isset($trigger) data-trigger="{{ $trigger }}" @endisset
    @isset($container) data-container="{{ $container }}" @endisset
    @isset($html) data-html="true" @endisset
    @isset($metadata) {{ $metadata }} @endisset
    @isset($attr)
        @if (is_array($attr))
            @foreach ($attr as $key => $value)
                @if ($value === true)
                    {{ $key }}
                @elseif ($value !== false && $value !== null)
                    {{ $key }}="{{ $value }}"
                @endif
            @endforeach
        @else
            {{ $attr }}
        @endif
    @endisset>
    <i class="fa fa-fw {{ $icon ?? '' }}"></i>
    {{ $txt ?? '' }}
</button>
@if ($url ?? false)
    </a>
@endif
