

<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between align-items-center mb-4">
    <h4>Prevention / Awareness Beneficiaries</h4>
    <a href="<?php echo e(route('c3.prevention.create')); ?>" class="btn btn-primary">+ New Beneficiary</a>
</div>

<?php if(session('success')): ?>
    <div class="alert alert-success alert-dismissible fade show" role="alert">
        <?php echo e(session('success')); ?>

        <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
    </div>
<?php endif; ?>

<div class="table-responsive">
    <table class="table table-striped table-hover">
        <thead class="table-dark">
            <tr>
                <th>Name</th>
                <th>Gender</th>
                <th>Age</th>
                <th>Category</th>
                <th>Location</th>
                <th>Activities</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $beneficiaries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $beneficiary): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td><?php echo e($beneficiary->name); ?></td>
                    <td><?php echo e($beneficiary->gender ?? '-'); ?></td>
                    <td><?php echo e($beneficiary->age ?? '-'); ?></td>
                    <td><?php echo e($beneficiary->category_of_participants ?? '-'); ?></td>
                    <td><?php echo e($beneficiary->state); ?>, <?php echo e($beneficiary->county); ?></td>
                    <td>
                        <span class="badge bg-info"><?php echo e($beneficiary->activities_count ?? 0); ?></span>
                    </td>
                    <td>
                        <a href="<?php echo e(route('c3.prevention.show', $beneficiary->id)); ?>" class="btn btn-sm btn-info">View</a>
                        <a href="<?php echo e(route('c3.prevention.edit', $beneficiary->id)); ?>" class="btn btn-sm btn-warning">Edit</a>
                        <form method="POST" action="<?php echo e(route('c3.prevention.destroy', $beneficiary->id)); ?>" style="display:inline;">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Delete this record?')">Delete</button>
                        </form>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="7" class="text-center text-muted py-4">No beneficiaries found</td>
                </tr>
            <?php endif; ?>
        </tbody>
    </table>
</div>

<?php if($beneficiaries->hasPages()): ?>
    <div class="d-flex justify-content-center mt-4">
        <?php echo e($beneficiaries->links()); ?>

    </div>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('c3.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wampserver64\www\sswseepcomponents\resources\views/c3/prevention/index.blade.php ENDPATH**/ ?>