

<?php $__env->startSection('content'); ?>
<style>
    .margin-element {
        margin: 90px;
    }
  
</style>

<div class="margin-element">
    <div class="content-body">
        <div class="container">
            <div class="row">
                <?php $__empty_1 = true; $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <?php if($ad->schedule): ?>
                <?php
                $currentTime = now()->format('H:i');
                $isScheduled = $ad->schedule->where('day', strtolower(now()->format('l')))
                                          ->where('start', '<', $currentTime)
                                          ->where('end', '>', $currentTime)
                                          ->first();
                ?>

                <?php if(!$isScheduled): ?>
                    <?php continue; ?>
                <?php endif; ?>
                <?php endif; ?>

                <div class="col-lg-6">
                    <div class="card claim-card">
                        <div class="card-body">
                            <h4 class="mb-3">Claim Energy Profit</h4>
                            <center>
                                <h2 class="alert alert-primary">Amount: <?php echo e($ad->amount); ?></h2>
                            </center>
                            <hr class="mb-4">
                            <a class="btn btn-primary btn-block" href="<?php echo e(route('user.ptc.show', encrypt($ad->id . '|' . auth()->user()->id))); ?>">
                                Claim Earning
                            </a>
                        </div>
                    </div>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="col-lg-12">
                    <div class="alert alert-danger">
                        <p>Check back later for more opportunities.</p>
                    </div>
                </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>

<script src="/assets/global/js/jquery-3.6.0.min.js"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make($activeTemplate . 'layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ptctheme/d4.superearning.online/core/resources/views/templates/dark_gold/user/ptc/index.blade.php ENDPATH**/ ?>