

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

<div class="bg-white/10 backdrop-blur-lg border border-white/10 rounded-2xl shadow-2xl p-6">

    <!-- HEADER -->
    <div class="flex justify-between items-center mb-6">
        <h2 class="text-2xl font-bold text-white tracking-wide">
            ðŸ‘¤ Users
        </h2>

        <a href="<?php echo e(url('/users/create')); ?>"
           class="bg-gradient-to-r from-indigo-500 to-purple-600 hover:scale-105 transition text-white px-5 py-2 rounded-lg shadow-lg">
           + Add User
        </a>
    </div>

<div class="flex flex-col md:flex-row gap-4 mb-4">

    <!-- NAME FILTER -->
    <input type="text" id="searchName"
        placeholder="🔍 Search Name..."
        class="px-4 py-2 rounded-lg bg-white/10 border border-white/20 text-white outline-none w-full">

    <!-- PHONE FILTER -->
    <input type="text" id="searchPhone"
        placeholder="📱 Search Phone..."
        class="px-4 py-2 rounded-lg bg-white/10 border border-white/20 text-white outline-none w-full">

</div>    <div class="overflow-x-auto rounded-xl">

        <table class="w-full text-sm text-left text-gray-300">

            <thead class="bg-white/10 text-gray-200 uppercase text-xs tracking-wider">
                <tr>
                    <th class="px-4 py-3">ID</th>
                    <th class="px-4 py-3">Name</th>
                    <th class="px-4 py-3">Email</th>
                    <th class="px-4 py-3">Phone</th>
                    <th class="px-4 py-3 text-center">Actions</th>
                </tr>
            </thead>

            <tbody>

            <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr class="border-b border-white/10 hover:bg-white/5 transition user-row">

    <td class="px-4 py-3 font-semibold text-white">
        #<?php echo e($row->id); ?>

    </td>

    <td class="px-4 py-3 user-name">
        <?php echo e($row->name); ?>

    </td>

    <td class="px-4 py-3">
        <?php echo e($row->email); ?>

    </td>

    <td class="px-4 py-3 user-phone">
        <?php echo e($row->phone); ?>

    </td>            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            </tbody>

        </table>

    </div>

</div>

<?php $__env->stopSection(); ?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<script>
$(document).ready(function(){

    function filterUsers() {
        let name = $('#searchName').val().toLowerCase();
        let phone = $('#searchPhone').val().toLowerCase();

        $('.user-row').filter(function() {

            let rowName = $(this).find('.user-name').text().toLowerCase();
            let rowPhone = $(this).find('.user-phone').text().toLowerCase();

            let matchName = rowName.includes(name);
            let matchPhone = rowPhone.includes(phone);

            $(this).toggle(matchName && matchPhone);
        });
    }

    $('#searchName, #searchPhone').on('keyup', filterUsers);

});
</script>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/jitrealx/public_html/amccms/resources/views/users/index.blade.php ENDPATH**/ ?>