<div class="mt-3">

    <div class="col-12 mt-3 mb-3 text-center" style="color: #536c79">
        <div class="mt-2">
            <h2><b>PORTAL DO CONTRIBUINTE</b></h2>
        </div>
    </div>

    <div class="card ">
        <div class="card-header font-semibold text-center">
            <?php echo e(__('SELEÇÃO DE INSTITUIÇÃO')); ?>

        </div>

        <?php if(session()->has('message')): ?>
            <div class="alert alert-danger">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <i class="material-icons">close</i>
                </button>
                <span>
                <?php echo e(session('message')); ?></span>
            </div>
        <?php endif; ?>

        <br>
        <div>
            <nav class="navbar navbar-light bg-light">
                
                
                
                
                
                
                

                <div class="col-sm-12 col-md-4 offset-md-4">
                    <input wire:model.debouce.300ms="search"
                           class="form-control" aria-label="Pesquisar"
                           id="search" type="search" placeholder="Pesquisar..."/>
                </div>
            </nav>

            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead class="text-dark">
                        <tr>
                            <th class="text-center">INSTITUIÇÃO</th>
                        </tr>
                        </thead>
                        <tbody wire:loading.remove>
                        <?php if(session()->has('message')): ?>
                            <div class="alert alert-danger">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                    <i class="material-icons">close</i>
                                </button>
                                <span>
                            <?php echo e(session('message')); ?></span>
                            </div>
                        <?php endif; ?>

                        
                        <?php if(strlen($search) > 2): ?>
                            <?php $__empty_1 = true; $__currentLoopData = $searchResult; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $result): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <tr>
                                    <td class="text-center">
                                        <a href="<?php echo e(route('autenticacao', ['cnpj'=> $result->cnpj])); ?>"
                                           class="btn btn-outline-success my-2 my-sm-0"><?php echo e($result->nome ?? '--'); ?></a>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <tr class="px-4 py-4">
                                    <td class="text-center text-gray-300">
                                        Nenhum resultado para "<?php echo e($search); ?>"
                                    </td>
                                </tr>
                            <?php endif; ?>
                        <?php endif; ?>
                        </tbody>
                    </table>
                </div>
                <div class="row justify-content-center">
                    <div wire:loading class='justify-content-center'>
                        CARREGANDO...
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<?php /**PATH C:\xampp\htdocs\portal_contribuinte\resources\views/livewire/instituicao/selecao.blade.php ENDPATH**/ ?>