<?php $__env->startSection('title', 'اشتراكات المستخدمين'); ?>
<?php $__env->startSection('heading', 'اشتراكات المستخدمين'); ?>
<?php $__env->startSection('subheading', 'سجل التعيينات التجريبية من لوحة التحكم'); ?>

<?php $__env->startSection('content'); ?>
    <div class="mb-6 flex flex-wrap items-center justify-between gap-3">
        <a href="<?php echo e(route('admin.subscription-plans.index')); ?>" class="text-sm font-medium text-teal-700 hover:underline">← خطط الاشتراك</a>
        <a href="<?php echo e(route('admin.users.index')); ?>" class="text-sm font-medium text-teal-700 hover:underline">المستخدمون</a>
    </div>

    <div class="overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-sm">
        <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-zinc-200 text-sm">
                <thead class="bg-zinc-50 text-right text-xs font-semibold uppercase tracking-wide text-zinc-500">
                    <tr>
                        <th class="px-4 py-3">#</th>
                        <th class="px-4 py-3">المستخدم</th>
                        <th class="px-4 py-3">الخطة</th>
                        <th class="px-4 py-3">يبدأ</th>
                        <th class="px-4 py-3">ينتهي</th>
                        <th class="px-4 py-3">الحالة</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-zinc-100">
                    <?php $__empty_1 = true; $__currentLoopData = $rows; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td class="px-4 py-3 text-zinc-500"><?php echo e($row->id); ?></td>
                            <td class="px-4 py-3">
                                <a href="<?php echo e(route('admin.users.show', $row->user)); ?>" class="font-medium text-teal-800 hover:underline">
                                    <?php echo e($row->user?->full_name ?? '—'); ?>

                                </a>
                                <div class="text-xs text-zinc-500"><?php echo e('@'.($row->user?->username ?? '')); ?></div>
                            </td>
                            <td class="px-4 py-3"><?php echo e($row->plan?->name ?? '—'); ?> <span class="font-mono text-xs text-zinc-500">(<?php echo e($row->plan?->slug); ?>)</span></td>
                            <td class="whitespace-nowrap px-4 py-3 text-xs text-zinc-600"><?php echo e($row->starts_at?->format('Y-m-d H:i')); ?></td>
                            <td class="whitespace-nowrap px-4 py-3 text-xs text-zinc-600"><?php echo e($row->ends_at?->format('Y-m-d H:i') ?? '—'); ?></td>
                            <td class="px-4 py-3"><?php echo e($row->status); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="6" class="px-4 py-8 text-center text-zinc-500">لا توجد اشتراكات مسجّلة بعد.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
        <div class="border-t border-zinc-100 px-4 py-3">
            <?php echo e($rows->links()); ?>

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

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\madar-backend\resources\views\admin\user-subscriptions\index.blade.php ENDPATH**/ ?>