<?php $__env->startSection('title', 'درخواست‌های همکاری'); ?>

<?php $__env->startSection('content'); ?>
    <h1 class="text-xl font-bold mb-6">درخواست‌های همکاری (نظارت)</h1>

    <form method="GET" class="flex flex-wrap gap-2 mb-4">
        <select name="status" class="border rounded-lg px-3 py-2 text-sm">
            <option value="">همه وضعیت‌ها</option>
            <option value="pending" <?php if(request('status') === 'pending'): echo 'selected'; endif; ?>>در انتظار</option>
            <option value="accepted" <?php if(request('status') === 'accepted'): echo 'selected'; endif; ?>>پذیرفته‌شده</option>
            <option value="rejected" <?php if(request('status') === 'rejected'): echo 'selected'; endif; ?>>رد شده</option>
        </select>
        <button class="bg-gray-100 px-4 py-2 rounded-lg text-sm">اعمال فیلتر</button>
    </form>

    <div class="bg-white rounded-xl shadow-sm overflow-x-auto">
        <table class="w-full text-sm">
            <thead class="bg-gray-50 text-gray-500">
                <tr>
                    <th class="p-3 text-right">ورزشکار</th>
                    <th class="p-3 text-right">مربی</th>
                    <th class="p-3 text-right">وضعیت</th>
                    <th class="p-3 text-right">قیمت</th>
                    <th class="p-3 text-right">تاریخ</th>
                </tr>
            </thead>
            <tbody class="divide-y">
                <?php $__empty_1 = true; $__currentLoopData = $requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $req): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td class="p-3"><?php echo e($req->athlete->user->fullName()); ?></td>
                        <td class="p-3"><?php echo e($req->coach->user->fullName()); ?></td>
                        <td class="p-3"><?php echo e($req->status->label()); ?></td>
                        <td class="p-3"><?php echo e($req->price ? number_format($req->price) : '—'); ?></td>
                        <td class="p-3"><?php echo e(verta($req->created_at)->format('Y/m/d')); ?></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="5" class="p-6 text-center text-gray-400">درخواستی یافت نشد.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>

    <div class="mt-4"><?php echo e($requests->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\paradox\Desktop\fresh\abtin-sport-platform\resources\views/admin/coach-requests/index.blade.php ENDPATH**/ ?>