


<?php $__env->startSection('content'); ?>
<?php echo $__env->make('../navbar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<section id="leaderboard" class="relative pt-24 pb-12">
   <div class="container">
      <div class="mx-auto max-w-4xl text-center">
         <h2 class="text-base font-semibold leading-7 text-primary-600">Leaderboard</h2>
         <p class="mt-2 text-3xl font-bold tracking-tight text-white sm:text-4xl">Top 10 Pembelian Terbanyak di <?php echo e(env('APP_NAME')); ?></p>
      </div>
      <p class="mx-auto mt-6 max-w-3xl text-center text-lg leading-8 text-murky-400">Berikut ini adalah daftar 10 pembelian terbanyak yang dilakukan oleh pelanggan kami. Data ini diambil dari sistem kami dan selalu diperbaharui.</p>
      <div class="isolate mx-auto mt-10 grid max-w-md grid-cols-1 gap-8 md:grid-cols-2 lg:mx-0 lg:max-w-none xl:grid-cols-3">
         <div>
            <h2 class="ml-3 inline-flex rounded-t-md border border-b-0 border-murky-600 bg-murky-700 py-1 px-4 text-xs leading-6">Top 10 - Hari Ini</h2>
            <div class="relative rounded-lg bg-murky-800/50 p-6 ring-1 ring-murky-700">
               <ul class="space-y-3 text-sm leading-6 text-white">
                  <?php $__currentLoopData = $top10Today; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                     <?php if($item->username): ?>
                        <?php
                           $usernameLength = strlen($item->username);
                           $sensorLength = $usernameLength <= 5 ? 2 : 4;
                           $start = floor(($usernameLength - $sensorLength) / 2);
                           $censoredUsername = substr_replace($item->username, str_repeat('*', $sensorLength), $start, $sensorLength);
                        ?>
                        <li class="flex items-center justify-between gap-x-3">
                           <div><?php echo e($index + 1); ?>. <?php echo e($censoredUsername); ?> <?php if($index == 0): ?>🏆 <?php elseif($index == 1): ?>🥇 <?php elseif($index == 2): ?>🥈 <?php endif; ?></div>
                           <div>Rp&nbsp;<?php echo e(number_format($item->total_harga, 0, ',', '.')); ?></div>
                        </li>
                     <?php endif; ?>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               </ul>
            </div>
         </div>
         <div>
            <h2 class="ml-3 inline-flex rounded-t-md border border-b-0 border-murky-600 bg-murky-700 py-1 px-4 text-xs leading-6">Top 10 - Minggu Ini</h2>
            <div class="relative rounded-lg bg-murky-800/50 p-6 ring-1 ring-murky-700">
               <ul class="space-y-3 text-sm leading-6 text-white">
                  <?php $__currentLoopData = $top10ThisWeek; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                     <?php if($item->username): ?>
                        <?php
                           $usernameLength = strlen($item->username);
                           $sensorLength = $usernameLength <= 5 ? 2 : 4;
                           $start = floor(($usernameLength - $sensorLength) / 2);
                           $censoredUsername = substr_replace($item->username, str_repeat('*', $sensorLength), $start, $sensorLength);
                        ?>
                        <li class="flex items-center justify-between gap-x-3">
                           <div><?php echo e($index + 1); ?>. <?php echo e($censoredUsername); ?> <?php if($index == 0): ?>🏆 <?php elseif($index == 1): ?>🥇 <?php elseif($index == 2): ?>🥈 <?php endif; ?></div>
                           <div>Rp&nbsp;<?php echo e(number_format($item->total_harga, 0, ',', '.')); ?></div>
                        </li>
                     <?php endif; ?>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               </ul>
            </div>
         </div>
         <div>
            <h2 class="ml-3 inline-flex rounded-t-md border border-b-0 border-murky-600 bg-murky-700 py-1 px-4 text-xs leading-6">Top 10 - Bulan Ini</h2>
            <div class="relative rounded-lg bg-murky-800/50 p-6 ring-1 ring-murky-700">
               <ul class="space-y-3 text-sm leading-6 text-white">
                  <?php $__currentLoopData = $top10ThisMonth; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                     <?php if($item->username): ?>
                        <?php
                           $usernameLength = strlen($item->username);
                           $sensorLength = $usernameLength <= 5 ? 2 : 4;
                           $start = floor(($usernameLength - $sensorLength) / 2);
                           $censoredUsername = substr_replace($item->username, str_repeat('*', $sensorLength), $start, $sensorLength);
                        ?>
                        <li class="flex items-center justify-between gap-x-3">
                           <div><?php echo e($index + 0); ?>. <?php echo e($censoredUsername); ?> <?php if($index == 1): ?>🏆 <?php elseif($index == 2): ?>🥇 <?php elseif($index == 3): ?>🥈 <?php endif; ?></div>
                           <div>Rp&nbsp;<?php echo e(number_format($item->total_harga, 0, ',', '.')); ?></div>
                        </li>
                     <?php endif; ?>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               </ul>
            </div>
         </div>
      </div>
   </div>
</section>




<?php echo $__env->make('../footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('template.template', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u870822285/domains/tokovouchergame.com/public_html/project/resources/views/template/leaderboard/index.blade.php ENDPATH**/ ?>