<?php $__env->startSection('content'); ?>
<link rel="stylesheet" href="<?php echo e(asset('static/tree/css/team.css')); ?>">


<body>
    <div class="team-wrap">


        <div class="top-wrap">
            <h1>my team</h1>
            <div class="wrap">

                <h2>
                    <img src="<?php echo e(asset('static/tree/img/m2.png')); ?>" alt="">
                    <span><?php echo e(number_format($level1_bonus + $level2_bonus + $level3_bonus)); ?></span>
                </h2>
                <p>total profit(₦)</p>

                <div>
                    <div>
                        <h2>
                            <img src="<?php echo e(asset('static/tree/img/m1.png')); ?>" alt="">
                            <span><?php echo e(number_format($level1->count() + $level2->count() + $level3->count())); ?></span>
                        </h2>
                        <p>total number of referrals</p>
                    </div>
                </div>

                <div class="yuan">
                    <div>
                        <img src="<?php echo e(asset('static/tree/img/m1.png')); ?>" alt="">
                        <h3><?php echo e($level1->count() + $level2->count() + $level3->count()); ?></h3>
                        <p>the right invitation</p>
                    </div>

                    <svg class="svg" viewBox="0 0 176 176">
                        <circle r="80" cy="88" cx="88" stroke-width="6" stroke="#F1F2F6"
                            stroke-linejoin="round" stroke-linecap="round" fill="none" />
                        <circle class="progress" r="80" cy="88" cx="88" stroke-width="10" stroke="#00BA63"
                            stroke-linejoin="round" stroke-linecap="round" fill="none" stroke-dashoffset="500"
                            stroke-dasharray="500" />
                        <!-- stroke-dasharray="500" 是定值 -->
                        <!-- 修改 stroke-dashoffset 值来修改进度 -->
                    </svg>
                </div>
            </div>

        </div>

        <h4>Team details</h4>
        <ul>
            <li onclick="onJump('<?php echo e(route('user.referrals.lv1')); ?>')">
                <div>
                    <span>
                        <img src="<?php echo e(asset('static/tree/img/lv1.png')); ?>" alt="">
                        <b>LV 1</b>
                    </span>
                    <img src="<?php echo e(asset('static/tree/img/arrow@2x.png')); ?>" alt="">
                </div>
                <p>
                    <span><?php echo e(number_format($level1->count())); ?></span>
                    <span></span>
                    <span><?php echo e(number_format($level1_bonus)); ?></span>
                </p>
                <h3>
                    <span>number of people</span>
                    <span></span>
                    <span>bonus(₦)</span>
                </h3>
            </li>

            <li onclick="onJump('<?php echo e(route('user.referrals.lv2')); ?>')">
                <div>
                    <span class="lv2">
                        <img src="<?php echo e(asset('static/tree/img/lv2.svg')); ?>" alt="">
                        <b>LV 2</b>
                    </span>
                    <img src="<?php echo e(asset('static/tree/img/arrow@2x.png')); ?>" alt="">
                </div>
                <p>
                    <span><?php echo e(number_format($level2->count())); ?></span>
                    <span></span>
                    <span><?php echo e(number_format($level2_bonus)); ?></span>
                </p>
                <h3>
                    <span>number of people</span>
                    <span></span>
                    <span>bonus(₦)</span>
                </h3>
            </li>

            <li onclick="onJump('<?php echo e(route('user.referrals.lv3')); ?>')">
                <div>
                    <span class="lv3">
                        <img src="<?php echo e(asset('static/tree/img/lv3.svg')); ?>" alt="">
                        <b>LV 3</b>
                    </span>
                    <img src="<?php echo e(asset('static/tree/img/arrow@2x.png')); ?>" alt="">
                </div>
                <p>
                    <span><?php echo e(number_format($level3->count())); ?></span>
                    <span></span>
                    <span><?php echo e(number_format($level3_bonus)); ?></span>
                </p>
                <h3>
                    <span>number of people</span>
                    <span></span>
                    <span>bonus(₦)</span>
                </h3>
            </li>
        </ul>
        <h4>Team Tie Rules</h4>

        <p class="tips">
            get 25% of level 1 supply,
            3% for level 2, 1% for level 3
            The bonus will be received immediately after the referrer pays.
        </p>

    </div>

    <?php echo $__env->make('templates.basic.partials.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</body>
<script>
    // tabBar
    tabBarActive(4);

    setTimeout(() => {
        let path = document.querySelector('.progress');

        // 如果 1000是满的  1000/2 = 500;

        //800 / 2 = 400

        // 500-400 = 100

        let number = <?php echo e($level1->count() + $level2->count() + $level3->count()); ?>;

        path.style.strokeDashoffset = number;
    }, 500);
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.users', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/AMPPS/www/ipad/core/resources/views/templates/basic/user/referrals.blade.php ENDPATH**/ ?>