

<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="row">
        <!-- Left Section - Chauffeur List -->
        <div class="col-md-6">
           
            <h2>
                <a href="http://localhost:8000/billets" class="back-icon">⬅</a> Liste Des Véhicules
            </h2>
            <div class="card">
                <div class="card-body">
                    <!-- Chauffeur List Pagination -->
                    <!-- Replace the following with your actual chauffeur data -->
                    <ul class="list-group">
    <?php $__currentLoopData = $chauffeurs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chauffeur): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <li class="list-group-item">
            <div style="display: flex; align-items: center; justify-content: space-between;">
                <div style="display: flex; align-items: center;">
                    <!-- <img src="<?php echo e(asset($chauffeur->profile_image)); ?>" alt="Logo" style="margin-right: 10px;"> -->
                    <div>
                        <p><?php echo e($chauffeur->name); ?></p>
                        <!-- <p><?php echo e($chauffeur->telephone); ?></p>
                        <p><?php echo e($chauffeur->address); ?></p>
                        <p><?php echo e($chauffeur->email); ?></p> -->
                    </div>
                </div>
                <form id="deleteForm" action="<?php echo e(route('chauffeurs.confirm-delete', $chauffeur->id)); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('delete'); ?>
                    <button type="button" class="btn btn-danger" onclick="confirmDelete()"><i class="fa fa-trash" aria-hidden="true"></i></button>
                </form>
            </div>
        </li>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>


                    <!-- Pagination Links -->
                    <?php echo e($chauffeurs->links()); ?>

                </div>
            </div>
        </div>

        <!-- Right Section - Add Chauffeur Form -->
        <div class="col-md-6">
            <h2>Ajouter Un Nouveau Véhicule</h2>
            <div class="card">
                <div class="card-body">
                    <!-- Add Chauffeur Form -->
                    <form action="<?php echo e(route('chauffeurs.store')); ?>" method="post" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        
                        <input type="text" name="name" placeholder="Matricule Véhicule" class="form-control">
                        <!-- <input type="email" name="email" placeholder="Email" class="form-control">
                        <input type="tel" name="telephone" placeholder="Telephone" class="form-control">
                        <textarea name="address" placeholder="Address" class="form-control"></textarea>
                        <input type="file" name="profile_image" class="form-control"> -->
                       <BR>
                        <button type="submit" class="btn btn-primary">Ajouter</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
        function confirmDelete() {
            var result = confirm("Are you sure you want to delete?");
            if (result) {
                document.getElementById('deleteForm').submit();
            }
        }
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.test', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Toby\Desktop\cabs\resources\views/chauffeurs/create.blade.php ENDPATH**/ ?>