<?php echo $__env->make('admin.subscription.partials.data', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

<div class="space-y-4">
    <?php $__currentLoopData = $usageLimits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $limit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
            $allowed = $limit['allowed'] ?? null;
            $percent = $limit['percent'] ?? ($allowed ? min(100, round(($limit['used'] / $allowed) * 100)) : 0);
            $allowedDisplay = $limit['allowed_display'] ?? ($allowed ? number_format($allowed) : 'Unlimited');
        ?>
        <div class="rounded-lg border border-booklio-border bg-white p-4 shadow-soft">
            <div class="mb-2 flex items-start justify-between gap-3">
                <div>
                    <p class="text-sm font-extrabold text-booklio-dark"><?php echo e($limit['label']); ?></p>
                    <p class="mt-1 text-xs font-semibold text-booklio-muted"><?php echo e(number_format($limit['used'])); ?> of <?php echo e($allowedDisplay); ?> used</p>
                </div>
                <span class="text-sm font-extrabold text-booklio-primary"><?php echo e($allowed ? $percent.'%' : 'Unlimited'); ?></span>
            </div>
            <div class="h-3 rounded-full bg-slate-100">
                <div class="h-3 rounded-full <?php echo e($percent > 85 ? 'bg-amber-500' : 'bg-booklio-primary'); ?>" style="width: <?php echo e($percent); ?>%"></div>
            </div>
            <p class="mt-2 text-xs font-semibold text-booklio-muted"><?php echo e($limit['note']); ?></p>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php /**PATH C:\Users\Dcodax\Documents\Booklio\resources\views/admin/subscription/partials/usage-bars.blade.php ENDPATH**/ ?>