<?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.dashboard')); ?>" class="text-sm font-medium text-teal-700 hover:underline">← الرئيسية</a>
        <a href="<?php echo e(route('admin.user-subscriptions.index')); ?>" class="rounded-xl border border-zinc-300 bg-white px-4 py-2 text-sm font-bold text-zinc-800 hover:bg-zinc-50">اشتراكات المستخدمين</a>
    </div>

    <?php if(session('success')): ?>
        <div class="mb-4 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-900"><?php echo e(session('success')); ?></div>
    <?php endif; ?>

    <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">slug</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 $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td class="px-4 py-3 font-medium text-zinc-900"><?php echo e($plan->name); ?></td>
                            <td class="px-4 py-3 font-mono text-xs text-zinc-600"><?php echo e($plan->slug); ?></td>
                            <td class="px-4 py-3 font-mono"><?php echo e(number_format((float) $plan->price, 2)); ?></td>
                            <td class="px-4 py-3"><?php echo e($plan->daily_ai_limit); ?></td>
                            <td class="px-4 py-3"><?php echo e($plan->monthly_ai_limit === null ? '∞' : $plan->monthly_ai_limit); ?></td>
                            <td class="px-4 py-3">
                                <span class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium <?php echo e($plan->status === 'active' ? 'bg-emerald-100 text-emerald-800' : 'bg-zinc-200 text-zinc-700'); ?>">
                                    <?php echo e($plan->status); ?>

                                </span>
                            </td>
                            <td class="px-4 py-3">
                                <a href="<?php echo e(route('admin.subscription-plans.edit', $plan)); ?>" class="text-xs font-bold text-teal-700 hover:underline">تعديل</a>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </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\subscription-plans\index.blade.php ENDPATH**/ ?>