<?php $__env->startSection('title', 'Packages'); ?>
<?php $__env->startSection('content'); ?>
<section class="hero" style="padding: 4rem 0;">
    <div class="container text-center">
        <h1>Pricing & Packages</h1>
        <p class="lead">Pay once. Publish forever.</p>
    </div>
</section>

<div class="container py-5">
    <div class="row g-4 justify-content-center">
        <?php $__empty_1 = true; $__currentLoopData = $packages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div class="col-md-4">
                <div class="package-card <?php echo e($package->is_featured ? 'featured' : ''); ?>">
                    <div class="package-name"><?php echo e($package->name); ?></div>
                    <div class="package-blogs"><?php echo e($package->blogs_count); ?> <?php echo e($package->blogs_count === 1 ? 'blog' : 'blogs'); ?></div>
                    <div class="package-price">$<?php echo e(number_format($package->price, 0)); ?><small>/once</small></div>
                    <?php if($package->description): ?><p class="text-muted"><?php echo e($package->description); ?></p><?php endif; ?>
                    <?php if(!empty($package->features)): ?>
                    <ul class="package-features"><?php $__currentLoopData = $package->features; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $f): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($f); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></ul>
                    <?php endif; ?>
                    <?php if(auth()->guard()->check()): ?>
                        <form action="<?php echo e(auth()->user()->isReseller() ? route('reseller.packages.buy', $package) : route('user.packages.buy', $package)); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <button class="btn btn-<?php echo e($package->is_featured ? 'accent' : 'primary'); ?> w-100">Buy with PayPal</button>
                        </form>
                    <?php else: ?>
                        <a href="<?php echo e(route('register')); ?>" class="btn btn-<?php echo e($package->is_featured ? 'accent' : 'primary'); ?> w-100">Sign Up & Buy</a>
                    <?php endif; ?>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <div class="col-md-8 text-center text-muted py-5">No packages set up yet.</div>
        <?php endif; ?>
    </div>

    <div class="text-center mt-5">
        <p class="text-muted">Need a custom plan? <a href="<?php echo e(route('contact')); ?>">Contact us</a> for bulk packages.</p>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.public', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp82\htdocs\blog\resources\views/frontend/packages.blade.php ENDPATH**/ ?>