<?php $__env->startSection('content'); ?>

<!-- PAGE HEADER -->
<div class="max-w-7xl mx-auto px-6 mb-8 flex flex-col md:flex-row justify-between items-center">
    <div class="mb-4 md:mb-0">
        <h1 class="text-3xl font-bold text-gray-800">Members</h1>
        <p class="text-gray-500 text-sm mt-1">Manage all registered members</p>
    </div>

    <a href="/admin/members/create"
       class="bg-green-600 text-white px-6 py-2 rounded-lg shadow hover:bg-green-700 transition">
        + Add Member
    </a>
</div>

<!-- MEMBERS TABLE -->
<div class="max-w-7xl mx-auto px-6">
    <div class="bg-white rounded-2xl shadow-lg overflow-hidden border border-gray-100">

        <table class="min-w-full text-left text-sm">
            <thead class="bg-gray-50 text-gray-600 uppercase text-xs tracking-wider">
                <tr>
                    <th class="px-6 py-4">Name</th>
                    <th class="px-6 py-4">Role</th>
                    <th class="px-6 py-4 text-right">Actions</th>
                </tr>
            </thead>

            <tbody class="divide-y divide-gray-100">
                <?php $__empty_1 = true; $__currentLoopData = $members; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $member): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="hover:bg-gray-50 transition">
                        <!-- NAME -->
                        <td class="px-6 py-4 font-medium text-gray-800">
                            <?php echo e($member->name); ?>

                        </td>

                        <!-- ROLE -->
                        <td class="px-6 py-4 text-gray-600">
                            <?php echo e(ucfirst($member->role)); ?>

                        </td>

                        <!-- ACTIONS -->
                        <td class="px-6 py-4 text-right flex justify-end gap-4">
                            <!-- EDIT ICON -->
                            <a href="/admin/members/<?php echo e($member->id); ?>/edit"
                               class="text-blue-600 hover:text-blue-800" title="Edit">
                                <i class="fas fa-edit fa-lg"></i>
                            </a>

                            <!-- DELETE ICON -->
                            <form method="POST"
                                  action="/admin/members/<?php echo e($member->id); ?>"
                                  class="inline-block"
                                  onsubmit="return confirm('Are you sure you want to delete this member?')">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('DELETE'); ?>
                                <button type="submit"
                                        class="text-red-600 hover:text-red-800" title="Delete">
                                    <i class="fas fa-trash fa-lg"></i>
                                </button>
                            </form>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="3" class="px-6 py-12 text-center text-gray-500">
                            No members found.
                        </td>
                    </tr>
                <?php endif; ?>
            </tbody>
        </table>

    </div>
</div>

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

<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/dawoodik/Documents/x/ahoj-admin/resources/views/admin/members/index.blade.php ENDPATH**/ ?>