<?php $__env->startSection('title', 'Manajemen User'); ?>
<?php $__env->startSection('header', 'Manajemen User'); ?>

<?php
    use Illuminate\Support\Js;
?>

<?php $__env->startSection('content'); ?>
<div class="min-h-screen bg-slate-50 p-3" x-data="{
    open: false,
    editOpen: false,
    deleteConfirm: false,
    selectedUser: null,
    deleteUrl: ''
}">

    <style>
        [x-cloak] {
            display: none !important;
        }

        .select-clean {
            appearance: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            background-image: none !important;
        }

        .select-clean::-ms-expand {
            display: none !important;
        }

        .modal-scroll::-webkit-scrollbar {
            width: 8px;
        }

        .modal-scroll::-webkit-scrollbar-track {
            background: #f1f5f9;
            border-radius: 999px;
        }

        .modal-scroll::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 999px;
        }

        .modal-scroll::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }
    </style>

    
    <div class="mb-4 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm">
        <div class="flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between">
            <div class="flex items-center gap-3">
                <div class="flex h-9 w-9 items-center justify-center rounded-lg bg-blue-50 text-blue-600">
                    <i class="fas fa-users text-xs"></i>
                </div>

                <div>
                    <h2 class="text-base font-bold text-slate-800">Manajemen User</h2>
                    <p class="mt-0.5 text-xs text-slate-500">
                        Kelola data auditor, bagian, email, dan akses akun pengguna sistem.
                    </p>
                </div>
            </div>

            <button @click="open = true"
                class="inline-flex h-9 items-center justify-center gap-2 rounded-lg bg-blue-600 px-4 text-xs font-semibold text-white shadow-sm transition hover:bg-blue-700 hover:shadow-md">
                <i class="fas fa-plus text-xs"></i>
                Tambah User
            </button>
        </div>
    </div>

    
    <div x-show="open"
        x-cloak
        x-transition.opacity
        class="fixed inset-0 z-50 flex items-center justify-center bg-slate-950/60 px-4 py-6 backdrop-blur-sm">

        <div @click.away="open = false"
            x-show="open"
            x-transition:enter="transition ease-out duration-200"
            x-transition:enter-start="opacity-0 scale-95 translate-y-2"
            x-transition:enter-end="opacity-100 scale-100 translate-y-0"
            x-transition:leave="transition ease-in duration-150"
            x-transition:leave-start="opacity-100 scale-100 translate-y-0"
            x-transition:leave-end="opacity-0 scale-95 translate-y-2"
            class="modal-scroll relative z-50 w-full max-w-xl max-h-[88vh] overflow-y-auto rounded-xl border border-slate-200 bg-white shadow-2xl">

            
            <div class="sticky top-0 z-10 flex items-center justify-between border-b border-slate-100 bg-white px-4 py-3">
                <div class="flex items-center gap-3">
                    <div class="flex h-9 w-9 items-center justify-center rounded-lg bg-blue-50 text-blue-600">
                        <i class="fas fa-user-plus text-xs"></i>
                    </div>

                    <div>
                        <h3 class="text-sm font-bold text-slate-800">Tambah User Baru</h3>
                        <p class="mt-0.5 text-xs text-slate-500">
                            Tambahkan akun auditor baru ke dalam sistem.
                        </p>
                    </div>
                </div>

                <button type="button"
                    @click="open = false"
                    class="flex h-8 w-8 items-center justify-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-700">
                    <i class="fas fa-xmark text-xs"></i>
                </button>
            </div>

            <form action="<?php echo e(route('admin.user.store')); ?>" method="POST">
                <?php echo csrf_field(); ?>

                <div class="px-4 py-4">
                    <div class="grid grid-cols-1 gap-3 md:grid-cols-2">

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Nama</label>
                            <input type="text"
                                name="name"
                                required
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition placeholder:text-slate-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                            <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="mt-1 block text-xs text-red-500"><?php echo e($message); ?></span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Email</label>
                            <input type="email"
                                name="email"
                                required
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition placeholder:text-slate-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                            <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="mt-1 block text-xs text-red-500"><?php echo e($message); ?></span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Bagian</label>

                            <div x-data="{ selectOpen: false }" class="relative">
                                <select name="bagian_id"
                                    required
                                    @focus="selectOpen = true"
                                    @blur="selectOpen = false"
                                    @change="selectOpen = false"
                                    class="select-clean h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 pr-9 text-xs text-slate-700 outline-none transition focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                                    <option value="">-- Pilih Bagian --</option>
                                    <?php $__currentLoopData = $bagians; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $bagian): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($bagian->id); ?>"><?php echo e($bagian->nama_bagian); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>

                                <span class="pointer-events-none absolute inset-y-0 right-3 flex items-center text-slate-500">
                                    <i class="fas fa-chevron-down text-[10px] transition-transform duration-300"
                                        :class="selectOpen ? 'rotate-180 text-blue-500' : 'rotate-0'"></i>
                                </span>
                            </div>

                            <?php $__errorArgs = ['bagian_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="mt-1 block text-xs text-red-500"><?php echo e($message); ?></span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div>
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Password</label>
                            <input type="password"
                                name="password"
                                required
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition placeholder:text-slate-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                            <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="mt-1 block text-xs text-red-500"><?php echo e($message); ?></span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div>
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Ulangi Password</label>
                            <input type="password"
                                name="password_confirmation"
                                required
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition placeholder:text-slate-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                        </div>

                    </div>
                </div>

                
                <div class="sticky bottom-0 z-10 flex items-center justify-end gap-2 border-t border-slate-100 bg-white px-4 py-3 shadow-[0_-8px_20px_rgba(15,23,42,0.06)]">
                    <button @click="open = false"
                        type="button"
                        class="inline-flex h-8 w-20 items-center justify-center gap-1 rounded-lg bg-gray-200 px-2 text-xs font-medium text-slate-600 transition hover:bg-gray-300">
                        <i class="fas fa-xmark text-[10px]"></i>
                        Batal
                    </button>

                    <button type="submit"
                        class="inline-flex h-8 w-20 items-center justify-center gap-1 rounded-lg bg-blue-500 px-2 text-xs font-medium text-white transition hover:bg-blue-600">
                        <i class="fas fa-check text-[10px]"></i>
                        Simpan
                    </button>
                </div>
            </form>
        </div>
    </div>

    
    <div x-show="editOpen && selectedUser"
        x-cloak
        x-transition.opacity
        class="fixed inset-0 z-50 flex items-center justify-center bg-slate-950/60 px-4 py-6 backdrop-blur-sm">

        <div @click.away="editOpen = false"
            x-show="editOpen && selectedUser"
            x-transition:enter="transition ease-out duration-200"
            x-transition:enter-start="opacity-0 scale-95 translate-y-2"
            x-transition:enter-end="opacity-100 scale-100 translate-y-0"
            x-transition:leave="transition ease-in duration-150"
            x-transition:leave-start="opacity-100 scale-100 translate-y-0"
            x-transition:leave-end="opacity-0 scale-95 translate-y-2"
            class="modal-scroll relative z-50 w-full max-w-xl max-h-[88vh] overflow-y-auto rounded-xl border border-slate-200 bg-white shadow-2xl">

            
            <div class="sticky top-0 z-10 flex items-center justify-between border-b border-slate-100 bg-white px-4 py-3">
                <div class="flex items-center gap-3">
                    <div class="flex h-9 w-9 items-center justify-center rounded-lg bg-blue-50 text-blue-600">
                        <i class="fas fa-user-pen text-xs"></i>
                    </div>

                    <div>
                        <h3 class="text-sm font-bold text-slate-800">Edit User</h3>
                        <p class="mt-0.5 text-xs text-slate-500">
                            Perbarui data auditor yang telah terdaftar.
                        </p>
                    </div>
                </div>

                <button type="button"
                    @click="editOpen = false"
                    class="flex h-8 w-8 items-center justify-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-700">
                    <i class="fas fa-xmark text-xs"></i>
                </button>
            </div>

            <form :action="`/admin/user/${selectedUser.id}`" method="POST">
                <?php echo csrf_field(); ?>
                <?php echo method_field('PUT'); ?>

                <div class="px-4 py-4">
                    <div class="grid grid-cols-1 gap-3 md:grid-cols-2">

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Nama</label>
                            <input type="text"
                                name="name"
                                :value="selectedUser.name"
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                        </div>

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Email</label>
                            <input type="email"
                                name="email"
                                :value="selectedUser.email"
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                        </div>

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Bagian</label>

                            <div x-data="{ selectOpen: false }" class="relative">
                                <select name="bagian_id"
                                    required
                                    @focus="selectOpen = true"
                                    @blur="selectOpen = false"
                                    @change="selectOpen = false"
                                    class="select-clean h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 pr-9 text-xs text-slate-700 outline-none transition focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                                    <template x-for="bagian in <?php echo e(Js::from($bagians)); ?>" :key="bagian.id">
                                        <option :value="bagian.id"
                                            x-text="bagian.nama_bagian"
                                            :selected="bagian.id === selectedUser.bagian_id"></option>
                                    </template>
                                </select>

                                <span class="pointer-events-none absolute inset-y-0 right-3 flex items-center text-slate-500">
                                    <i class="fas fa-chevron-down text-[10px] transition-transform duration-300"
                                        :class="selectOpen ? 'rotate-180 text-blue-500' : 'rotate-0'"></i>
                                </span>
                            </div>
                        </div>

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">
                                Password Baru <span class="font-normal text-slate-400">(opsional)</span>
                            </label>
                            <input type="password"
                                name="password"
                                placeholder="Kosongkan jika tidak ingin ubah"
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition placeholder:text-slate-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                        </div>

                        <div class="md:col-span-2">
                            <label class="mb-1 block text-xs font-semibold text-slate-600">Ulangi Password</label>
                            <input type="password"
                                name="password_confirmation"
                                class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 text-xs text-slate-700 outline-none transition focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                        </div>

                    </div>
                </div>

                
                <div class="sticky bottom-0 z-10 flex items-center justify-end gap-2 border-t border-slate-100 bg-white px-4 py-3 shadow-[0_-8px_20px_rgba(15,23,42,0.06)]">
                    <button @click="editOpen = false"
                        type="button"
                        class="inline-flex h-8 w-20 items-center justify-center gap-1 rounded-lg bg-gray-200 px-2 text-xs font-medium text-slate-600 transition hover:bg-gray-300">
                        <i class="fas fa-xmark text-[10px]"></i>
                        Batal
                    </button>

                    <button type="submit"
                        class="inline-flex h-8 w-20 items-center justify-center gap-1 rounded-lg bg-blue-500 px-2 text-xs font-medium text-white transition hover:bg-blue-600">
                        <i class="fas fa-check text-[10px]"></i>
                        Update
                    </button>
                </div>
            </form>
        </div>
    </div>

    
    <div x-show="deleteConfirm"
        x-cloak
        x-transition.opacity
        class="fixed inset-0 z-50 flex items-center justify-center bg-slate-950/60 px-4 backdrop-blur-sm">

        <div @click.away="deleteConfirm = false"
            x-show="deleteConfirm"
            x-transition:enter="transition ease-out duration-200"
            x-transition:enter-start="opacity-0 scale-95 translate-y-2"
            x-transition:enter-end="opacity-100 scale-100 translate-y-0"
            x-transition:leave="transition ease-in duration-150"
            x-transition:leave-start="opacity-100 scale-100 translate-y-0"
            x-transition:leave-end="opacity-0 scale-95 translate-y-2"
            class="w-full max-w-sm overflow-hidden rounded-xl border border-slate-200 bg-white shadow-2xl">

            <div class="border-b border-slate-100 bg-white px-4 py-3">
                <div class="flex items-center gap-3">
                    <div class="flex h-9 w-9 items-center justify-center rounded-lg bg-red-50 text-red-500">
                        <i class="fas fa-trash text-xs"></i>
                    </div>

                    <div>
                        <h3 class="text-sm font-bold text-slate-800">Konfirmasi Hapus</h3>
                        <p class="mt-0.5 text-xs text-slate-500">
                            Apakah Anda yakin ingin menghapus user ini?
                        </p>
                    </div>
                </div>
            </div>

            <div class="flex items-center justify-end gap-2 bg-slate-50/80 px-4 py-3">
                <button @click="deleteConfirm = false"
                    class="inline-flex h-8 w-20 items-center justify-center gap-1 rounded-lg bg-gray-200 px-2 text-xs font-medium text-slate-600 transition hover:bg-gray-300">
                    <i class="fas fa-xmark text-[10px]"></i>
                    Batal
                </button>

                <form :action="deleteUrl" method="POST">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('DELETE'); ?>

                    <button type="submit"
                        class="inline-flex h-8 w-20 items-center justify-center gap-1 rounded-lg bg-red-600 px-2 text-xs font-medium text-white transition hover:bg-red-700">
                        <i class="fas fa-trash text-[10px]"></i>
                        Hapus
                    </button>
                </form>
            </div>
        </div>
    </div>

    
    <div class="mb-4 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm">

        
        <div class="border-b border-slate-100 bg-white px-4 py-3">
            <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
                <div class="flex items-center gap-3">
                    <div class="flex h-9 w-9 items-center justify-center rounded-lg bg-emerald-50 text-emerald-600">
                        <i class="fas fa-clipboard-list text-xs"></i>
                    </div>

                    <div>
                        <h3 class="text-sm font-bold text-slate-800">Daftar Auditor</h3>
                        <p class="mt-0.5 text-xs text-slate-500">
                            Data auditor yang telah terdaftar dalam sistem.
                        </p>
                    </div>
                </div>

                <div class="relative w-full sm:w-64">
                    <input type="text"
                        id="searchInput"
                        placeholder="Cari user..."
                        class="h-9 w-full rounded-lg border border-slate-200 bg-slate-50 pl-3 pr-9 text-xs text-slate-700 shadow-sm outline-none transition placeholder:text-slate-400 focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">

                    <span class="pointer-events-none absolute inset-y-0 right-3 flex items-center text-slate-400">
                        <svg class="h-3.5 w-3.5"
                            fill="none"
                            stroke="currentColor"
                            stroke-width="2"
                            viewBox="0 0 24 24">
                            <path stroke-linecap="round"
                                stroke-linejoin="round"
                                d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
                        </svg>
                    </span>
                </div>
            </div>
        </div>

        
        <div class="flex items-center gap-2 px-4 py-3 text-xs text-slate-600">
            <span>Tampilkan</span>

            <div x-data="{ selectOpen: false }" class="relative">
                <select id="entriesPerPage"
                    @focus="selectOpen = true"
                    @blur="selectOpen = false"
                    @change="selectOpen = false"
                    class="select-clean h-8 w-20 rounded-lg border border-slate-200 bg-slate-50 px-3 pr-8 text-xs font-medium text-slate-700 shadow-sm outline-none transition focus:border-blue-500 focus:bg-white focus:ring-2 focus:ring-blue-100">
                    <option value="5">5</option>
                    <option value="10" selected>10</option>
                    <option value="25">25</option>
                    <option value="50">50</option>
                </select>

                <span class="pointer-events-none absolute inset-y-0 right-3 flex items-center text-slate-500">
                    <i class="fas fa-chevron-down text-[10px] transition-transform duration-300"
                        :class="selectOpen ? 'rotate-180 text-blue-500' : 'rotate-0'"></i>
                </span>
            </div>

            <span>entri</span>
        </div>

        
        <div class="overflow-x-auto px-4 pb-4">
            <div class="overflow-hidden rounded-lg border border-slate-200">
                <table class="w-full min-w-[760px] border-collapse text-xs">
                    <thead>
                        <tr class="border-b border-slate-200 bg-slate-50 uppercase tracking-wide text-slate-500">
                            <th class="w-14 border-r border-slate-200 px-3 py-2 text-center font-bold">No</th>
                            <th class="border-r border-slate-200 px-3 py-2 text-center font-bold">Nama</th>
                            <th class="border-r border-slate-200 px-3 py-2 text-center font-bold">Email</th>
                            <th class="border-r border-slate-200 px-3 py-2 text-center font-bold">Bagian</th>
                            <th class="w-28 px-3 py-2 text-center font-bold">Aksi</th>
                        </tr>
                    </thead>

                    <tbody id="userTableBody" class="divide-y divide-slate-100">
                        <?php $__empty_1 = true; $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr class="transition hover:bg-slate-50">
                                <td class="border-r border-slate-100 px-3 py-2 text-center font-medium text-slate-600">
                                    <?php echo e($index + 1); ?>

                                </td>

                                <td class="border-r border-slate-100 px-3 py-2 text-left font-semibold text-slate-700">
                                    <?php echo e($user->name); ?>

                                </td>

                                <td class="border-r border-slate-100 px-3 py-2 text-left text-slate-600">
                                    <?php echo e($user->email); ?>

                                </td>

                                <td class="border-r border-slate-100 px-3 py-2 text-left text-slate-600">
                                    <?php echo e($user->bagian->nama_bagian ?? '-'); ?>

                                </td>

                                <td class="px-3 py-2 text-center">
                                    <div class="flex items-center justify-center gap-1.5">
                                        <button @click="selectedUser = <?php echo e(Js::from($user)); ?>, editOpen = true"
                                            class="inline-flex h-7 w-7 items-center justify-center rounded-md bg-blue-50 text-blue-600 transition hover:bg-blue-600 hover:text-white"
                                            title="Edit User">
                                            <i class="fas fa-edit text-[11px]"></i>
                                        </button>

                                        <button @click="deleteConfirm = true; deleteUrl = '/admin/user/<?php echo e($user->id); ?>'"
                                            class="inline-flex h-7 w-7 items-center justify-center rounded-md bg-red-50 text-red-500 transition hover:bg-red-500 hover:text-white"
                                            title="Hapus User">
                                            <i class="fas fa-trash text-[11px]"></i>
                                        </button>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="5" class="px-3 py-6 text-center text-xs italic text-slate-500">
                                    Belum ada auditor terdaftar.
                                </td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>

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

<?php $__env->startPush('scripts'); ?>
<script>
document.addEventListener("DOMContentLoaded", function () {
    const entriesSelect = document.getElementById("entriesPerPage");
    const searchInput = document.getElementById("searchInput");
    const tbody = document.getElementById("userTableBody");
    const rows = Array.from(tbody.querySelectorAll("tr"));

    function filterTable() {
        const searchTerm = searchInput.value.toLowerCase();
        const perPage = parseInt(entriesSelect.value);
        let visibleCount = 0;

        rows.forEach((row) => {
            const rowText = row.innerText.toLowerCase();
            const matches = rowText.includes(searchTerm);

            if (matches && visibleCount < perPage) {
                row.style.display = "";
                visibleCount++;
            } else {
                row.style.display = "none";
            }
        });
    }

    entriesSelect.addEventListener("change", filterTable);
    searchInput.addEventListener("input", filterTable);
    filterTable();
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\ea-systems\resources\views/admin/user.blade.php ENDPATH**/ ?>