<?php $__env->startSection('title', 'Data Pelamar'); ?>

<?php $__env->startSection('content'); ?>
<div class="mb-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
    <form action="<?php echo e(route('admin.applicants')); ?>" method="GET" class="flex flex-wrap items-center gap-2">
        <input type="text" name="search" value="<?php echo e(request('search')); ?>" placeholder="Cari nama, email, atau WhatsApp..."
            class="border border-gray-200 rounded-lg px-4 py-2 text-sm focus:ring-2 focus:ring-indigo-500 outline-none w-full sm:w-72">
        <button class="bg-gray-100 text-gray-600 px-4 py-2 rounded-lg text-sm hover:outline hover:outline-2 hover:outline-gray-400">Cari</button>
    </form>
    <div class="flex items-center gap-2">
        <a href="<?php echo e(route('admin.applicants.download', ['format' => 'csv'])); ?>"
           class="inline-flex items-center px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700">
            <svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/></svg>
            Download CSV
        </a>
        <a href="<?php echo e(route('admin.applicants.download', ['format' => 'txt'])); ?>"
           class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700">
            <svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/></svg>
            Download TXT
        </a>
    </div>
</div>

<div class="bg-white rounded-xl border border-gray-100 overflow-x-auto">
    <table class="w-full min-w-[600px]">
        <thead>
            <tr class="bg-gray-50 border-b border-gray-100">
                <th class="text-left px-6 py-3 text-xs font-medium text-gray-500 uppercase">Nama</th>
                <th class="text-left px-6 py-3 text-xs font-medium text-gray-500 uppercase">Email</th>
                <th class="text-left px-6 py-3 text-xs font-medium text-gray-500 uppercase">WhatsApp</th>
                <th class="text-left px-6 py-3 text-xs font-medium text-gray-500 uppercase">Pendidikan</th>
                <th class="text-left px-6 py-3 text-xs font-medium text-gray-500 uppercase">Lamaran</th>
                <th class="text-left px-6 py-3 text-xs font-medium text-gray-500 uppercase">Terdaftar</th>
            </tr>
        </thead>
        <tbody class="divide-y divide-gray-50">
            <?php $__empty_1 = true; $__currentLoopData = $applicants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $applicant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr class="hover:bg-gray-50">
                <td class="px-6 py-4 font-medium text-gray-800 text-sm"><?php echo e($applicant->name); ?></td>
                <td class="px-6 py-4 text-sm text-gray-600"><?php echo e($applicant->email); ?></td>
                <td class="px-6 py-4 text-sm text-gray-600"><?php echo e($applicant->whatsapp); ?></td>
                <td class="px-6 py-4 text-sm text-gray-600"><?php echo e($applicant->education); ?></td>
                <td class="px-6 py-4 text-sm text-gray-600"><?php echo e($applicant->applications_count); ?></td>
                <td class="px-6 py-4 text-xs text-gray-400"><?php echo e($applicant->created_at->format('d/m/Y')); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr>
                <td colspan="6" class="px-6 py-12 text-center text-gray-400">Belum ada pelamar</td>
            </tr>
            <?php endif; ?>
        </tbody>
    </table>
</div>

<div class="mt-6"><?php echo e($applicants->appends(request()->query())->links('pagination')); ?></div>
<?php $__env->stopSection(); ?>

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