@if (isset($permission) && auth()->user()->getPermissaoDetalhes($permission)['editar'])
    @php $formId = 'checkStatus_' . (isset($idPrefix) ? $idPrefix . '_' : '') . $index; @endphp
    <form id="{{ $formId }}" class="fix" action="{{ route($route, $id)}}" method="post">
        @csrf
        @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
        @if($status == "ATIVADO" || $status == 1 )
            <div class="form-check form-switch d-flex justify-content-center">
                <input type="hidden" name="checkStatus" value="DESATIVADO">
                <input class="form-check-input" type="checkbox" checked
                   onclick="javascript:document.getElementById('{{ $formId }}').submit()">
            </div>
        @else
            <div class="form-check form-switch d-flex justify-content-center">
                <input type="hidden" name="checkStatus" value="ATIVADO">
                <input class="form-check-input" type="checkbox"
                   onclick="javascript:document.getElementById('{{ $formId }}').submit()">
            </div>
        @endif
    </form>
@endif
