@if (isset($permission) && auth()->user()->getPermissaoDetalhes($permission)['excluir'])
    <form class="d-inline" action="{{ route($route, $id) }}" method="post" onsubmit="return confirmDelete(this)">
        @csrf
        @if(isset($method))
            @method($method)
        @else
            @method('delete')
        @endif
        @if(!empty($queryParams))
            @foreach($queryParams as $key => $value)
                @if($value !== null && $value !== '')
                    <input type="hidden" name="{{ $key }}" value="{{ $value }}">
                @endif
            @endforeach
        @else
            <input type="hidden" name="page" value="{{ request()->input('page', 1) }}">
            @if(request()->filled('q'))
                <input type="hidden" name="q" value="{{ request()->input('q') }}">
            @endif
        @endif
        <input type="hidden" name="confirm" value="{{ __($message) }}">
        <button type="submit" class="btn btn-sm btn-danger" title="{{ $title }}">
        @if($fontawesome == null)
            <i class="fa-solid fa-trash"></i>
        @else
            {!! $fontawesome !!}
        @endif
        </button>
    </form>
@endif
