
<?php $__env->startSection('content'); ?>
                            
                            
                            <body class="huiBg">
<div class="top">
    <a  class="topLeft">
      
    </a>
    <div class="topTit">
     Invest Rankings
    </div>
</div>

 <!-- font  -->
    <link href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@1,400;1,500&family=Maven+Pro:wght@400;500;600&display=swap" rel="stylesheet">


    <link href="<?php echo e(asset('assets/global/css/bootstrap.min.css')); ?>" rel="stylesheet">

    <link href="<?php echo e(asset('assets/global/css/all.min.css')); ?>" rel="stylesheet">

    <link rel="stylesheet" href="<?php echo e(asset('assets/global/css/line-awesome.min.css')); ?>" />

    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/lib/animate.css')); ?>">

    <!-- Plugin Link -->
    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/lib/slick.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/lib/magnific-popup.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/lib/apexcharts.css')); ?>">

    <!-- Main css -->
    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/main.css')); ?>">

    <?php echo $__env->yieldPushContent('style-lib'); ?>

    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/custom.css')); ?>">

    <link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue . 'css/color.php')); ?>?color=<?php echo $general->base_color ?>">



        <hr>

        <div class="row justify-content-center">
            <?php $nextRanking = $userRankings->where('id', '>', $user->user_ranking_id)->first(); ?>
            <?php if($nextRanking): ?>
                <div class="col-md-12 mb-4">
                    <div class="card custom--card">
                        <div class="card-body">
                            <div class="row gy-4 align-items-center">
                                <div class="col-lg-4 col-md-6">
                                    <div class="d-flex align-items-center raking-invest">
                                        <img src="<?php echo e(getImage(getFilePath('userRanking') . '/' . $nextRanking->icon, getFileSize('userRanking'))); ?>" alt="image">
                                        <div>
                                            <span><?php echo app('translator')->get('My Invest'); ?></span>
                                            <h5><?php echo e($general->cur_sym); ?><?php echo e(showAmount($user->total_invests)); ?> / <?php echo e($general->cur_sym); ?><?php echo e(showAmount($nextRanking->minimum_invest)); ?></h6>
                                                <?php if($nextRanking->minimum_invest - $user->total_invests > 0): ?>
                                                    <span><?php echo e($general->cur_sym); ?><?php echo e(showAmount($nextRanking->minimum_invest - $user->total_invests)); ?> <?php echo app('translator')->get('To unlock'); ?></span>
                                                <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-2 col-md-6">
                                    <div class="raking-common text-center">
                                        <span><?php echo app('translator')->get('No. of Direct Referral'); ?></span>
                                        <h5><?php echo e($user->activeReferrals->count()); ?> / <?php echo e($nextRanking->min_referral); ?></h5>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-6">
                                    <div class="raking-common text-center">
                                        <span><?php echo app('translator')->get('Team Invest'); ?></span>
                                        <h5><?php echo e($general->cur_sym); ?><?php echo e(showAmount($user->team_invests)); ?> / <?php echo e($general->cur_sym); ?><?php echo e(showAmount($nextRanking->min_referral_invest)); ?></h5>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-6">
                                    <div class="raking-common text-center">
                                        <span><?php echo app('translator')->get('Bonus'); ?></span>
                                        <h5><?php echo e($general->cur_sym); ?><?php echo e(showAmount($nextRanking->bonus)); ?></h5>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>

            <div class="col-md-12">
                <div class="row gy-4">
                    <?php $__currentLoopData = $userRankings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $userRanking): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if($user->user_ranking_id >= $userRanking->id): ?>
                            <?php $progressPercent = 100; ?>
                        <?php else: ?>
                            <?php
                                $myInvestPercent = ($user->total_invests / $userRanking->minimum_invest) * 100;
                                $refInvestPercent = ($user->team_invests / $userRanking->min_referral_invest) * 100;
                                $refCountPercent = ($user->activeReferrals->count() / $userRanking->min_referral) * 100;
                                
                                $myInvestPercent = $myInvestPercent < 100 ? $myInvestPercent : 100;
                                $refInvestPercent = $refInvestPercent < 100 ? $refInvestPercent : 100;
                                $refCountPercent = $refCountPercent < 100 ? $refCountPercent : 100;
                                $progressPercent = ($myInvestPercent + $refInvestPercent + $refCountPercent) / 3;
                            ?>
                        <?php endif; ?>
                        <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask <?php echo e($nextRanking->id < $userRanking->id ? 'badge-lock' : ''); ?>" data-progress="<?php echo e($nextRanking->id < $userRanking->id ? 0 : $progressPercent); ?>">
                                        <img src="<?php echo e(getImage(getFilePath('userRanking') . '/' . $userRanking->icon, getFileSize('userRanking'))); ?>" alt="image">
                                    </div>
                                </div>
                                <h4 class="invest-badge__title">
                                    <?php echo e(__($userRanking->name)); ?>

                                </h4>
                                <p class=invest-badge__subtitle><?php echo app('translator')->get('Bonus'); ?> - <?php echo e($general->cur_sym); ?><?php echo e(showAmount($userRanking->bonus)); ?></p>
                                <ul class="invest-badge__list invest-badge__details  invest-badge__details-<?php echo e($loop->iteration % 4 == 0 ? 4 : $loop->iteration % 4); ?> <?php echo e($loop->iteration % 3 == 0 ? 'invest-badge__detail_one' : 'invest-badge__detail_two'); ?>">
                                    <li class="d-flex "><span><?php echo app('translator')->get('Level'); ?> </span>
                                        <span>: <?php echo e($userRanking->level); ?></span>
                                    </li>
                                    <li class="d-flex "><span><?php echo app('translator')->get('Minimum Invest'); ?> </span>
                                        <span>: <?php echo e($general->cur_sym); ?><?php echo e(showAmount($userRanking->minimum_invest)); ?></span>
                                    </li>
                                    <li class="d-flex "><span><?php echo app('translator')->get('No. of Direct Referral'); ?> </span>
                                        <span>: <?php echo e($userRanking->min_referral); ?></span>
                                    </li>
                                    <li class="d-flex "><span><?php echo app('translator')->get('Referral Invest'); ?> </span>
                                        <span>: <?php echo e($general->cur_sym); ?><?php echo e(showAmount($userRanking->min_referral_invest)); ?></span>
                                    </li>
                                    <li class="d-flex "><span><?php echo app('translator')->get('Bonus'); ?> </span>
                                        <span>: <?php echo e($general->cur_sym); ?><?php echo e(showAmount($userRanking->bonus)); ?></span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('script'); ?>
    <script>
        (function($) {
            "use strict";

            var elements = $('.invest-badge__thumb__mask');
            elements.each(function(index, element) {
                let progress = $(element).data('progress');
                element.style.setProperty('--before-height', `${progress}%`);
            });

        })(jQuery);
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make($activeTemplate . 'layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/sites/28b/6/61db25e12e/public_html/perview/rayblue1/core/resources/views/templates/invester/user/user_ranking.blade.php ENDPATH**/ ?>