<?php $__env->startSection('listes'); ?>
    <style>
        .dtHorizontalVerticalExampleWrapper {
            max-width: 600px;
            margin: 0 auto;
        }

        #dtHorizontalVerticalExample th,
        td {
            white-space: nowrap;
        }

        table.dataTable thead .sorting:after,
        table.dataTable thead .sorting:before,
        table.dataTable thead .sorting_asc:after,
        table.dataTable thead .sorting_asc:before,
        table.dataTable thead .sorting_asc_disabled:after,
        table.dataTable thead .sorting_asc_disabled:before,
        table.dataTable thead .sorting_desc:after,
        table.dataTable thead .sorting_desc:before,
        table.dataTable thead .sorting_desc_disabled:after,
        table.dataTable thead .sorting_desc_disabled:before {
            bottom: .5em;
        }
    </style>
    <div class="pagetitle">
        <div class="row">
            <h1 class="col-5">Listes des policiers enregistrées</h1>
            <div class="col ">
                <h1 class="col text-end">
                <a href="<?php echo e(route('admins.index')); ?>">
                    <button type="button" class="btn btn-success">Retour</button>
                </a>
            </h1>




            </div>
            <nav>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="#">Liste de recherche des policiers enregistrées</a></li>
                </ol>
            </nav>
        </div><!-- End Page Title -->


        <section class="section">
            <div class="row">
                <div class="col-lg">
                    <!--------->
                    <div class="card-body">

                        <div class="dataTable-wrapper dataTable-loading no-footer sortable searchable fixed-columns">
                            <div class="dataTable-container">
                                <table id="dtHorizontalVerticalExample"  class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
                                    <thead>
                                        <tr>
                                            <th>Nom</th>
                                            <th>Matricule</th>
                                            <th>Password</th>
                                            <th>Actions</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if(!empty($admins) && $admins->count()): ?>
                                            <?php $__currentLoopData = $admins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $admin): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr>
                                                      <td><?php echo e($admin->id); ?></td>
                                                      <td><?php echo e($admin->email); ?></td>
                                                      <td class="fw-bold">.....................</td>

                                                    <td>
                                                        <div class=" d-flex grid ">
                                                            <div class="g-col-4">
                                                                <a href="<?php echo e(route('compte.edit', $admin->id)); ?>">
                                                                    <button class="btn bg-primary">
                                                                       <img class="pointer" src="<?php echo e(asset('assets/img/detail.png')); ?>"
                                                                           alt="" srcset="">
                                                                     </button>
                                                                   </a>
                                                            </div>
                                                            <div class="g-col-4 ms-2">
                                                                 <form action="<?php echo e(route('compte.destroy', $admin->id)); ?>" method="post">
                                                                    <?php echo csrf_field(); ?>
                                                                    <?php echo method_field('DELETE'); ?>
                                                                    <button class="btn bg-danger" type="submit" >
                                                                            <img src="<?php echo e(asset('assets/img/delete.png')); ?>" alt="" srcset="">
                                                                    </button>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </td>


                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <?php elseif(request()->input()): ?>
                                            <h3 class="text-danger"> <?php echo e($admins->total()); ?> .résultat pour la recherche."<?php echo e(request()->search); ?> "</h3>
                                        <?php endif; ?>
                                    </tbody>
                                </table>
                            </div>
                            <div class="dataTable-bottom">
                                <div class="dataTable-info">
                                </div>
                                <nav class="dataTable-pagination">
                                    <ul class="dataTable-pagination-list">

                                    </ul>
                                </nav>
                            </div>
                        </div>
                    </div>
                    <!------->

                </div>
            </div>

            <script>
                $(document).ready(function() {
                    $('#dtHorizontalVerticalExample').DataTable({
                        "scrollX": true,
                    });
                    $('.dataTables_length').addClass('bs-select');
                });
            </script>

        </section>
    <?php $__env->stopSection(); ?>










<?php echo $__env->make('layouts.super-Admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /opt/lampp/htdocs/polrep/resources/views/super_admin/SearchPolicier.blade.php ENDPATH**/ ?>