<?php $__env->startSection('title', 'Sacrament Participants'); ?>
<?php $__env->startSection('kicker', 'Holy Communion and sacrament participation records'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('partials.module-tabs', ['tabs' => [
        ['label' => 'Participants', 'route' => 'sacrament.index', 'icon' => 'cross'],
        ['label' => 'Register', 'route' => 'sacrament.create', 'icon' => 'plus'],
        ['label' => 'History', 'route' => 'sacrament.history', 'icon' => 'history'],
        ['label' => 'Eligible Members', 'route' => 'sacrament.eligible', 'icon' => 'badge-check'],
    ]], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="d-flex justify-content-between align-items-center mb-3">
        <form method="GET" class="d-flex gap-2">
            <input type="date" name="from_date" value="<?php echo e(request('from_date')); ?>" class="form-control">
            <input type="date" name="to_date" value="<?php echo e(request('to_date')); ?>" class="form-control">
            <button class="btn btn-outline-primary"><i data-lucide="filter"></i><span>Filter</span></button>
        </form>
        <a href="<?php echo e(route('sacrament.create')); ?>" class="btn btn-primary"><i data-lucide="plus"></i><span>Register Participation</span></a>
    </div>

    <div class="table-card">
        <div class="table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th>Member</th>
                        <th>Jumuiya</th>
                        <th>Sacrament</th>
                        <th>Service</th>
                        <th>Date</th>
                        <th>Status</th>
                        <th>Recorded By</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $records; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $record): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td class="fw-semibold"><?php echo e($record->member?->full_name); ?></td>
                            <td><?php echo e($record->member?->jumuiya?->name ?? '-'); ?></td>
                            <td><?php echo e($record->sacramentType?->name); ?></td>
                            <td><?php echo e($record->churchService?->name ?? '-'); ?></td>
                            <td><?php echo e($record->sacrament_date?->format('d M Y')); ?></td>
                            <td><span class="badge badge-soft"><?php echo e(ucfirst(str_replace('_', ' ', $record->status))); ?></span></td>
                            <td><?php echo e($record->recordedBy?->full_name ?? 'System'); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="7"><div class="empty-state">Hakuna sacrament records bado.</div></td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
        <?php echo e($records->links()); ?>

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

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/anglican/resources/views/sacrament/index.blade.php ENDPATH**/ ?>