<?php $__env->startSection('content'); ?>
    <style type="text/css">
        .top1 {
            position: fixed;
            background: #fff;
            z-index: 10000;
            width: 100%;
            height: 30px;
            top: -30px;
        }

        .small-font {
            font-size: 12px;
            -webkit-transform-origin-x: 0;
            -webkit-transform: scale(0.80);
        }

        .smallsize-font {
            font-size: 9.6px;
        }

        .navtab {
            cursor: pointer;
        }

        .gray {
            -webkit-filter: grayscale(100%);
            -moz-filter: grayscale(100%);
            -ms-filter: grayscale(100%);
            -o-filter: grayscale(100%);
            filter: grayscale(100%);
            filter: blue;
        }

        .topname {
            line-height: 46px;
            font-weight: 700;
            font-size: 16px;
            width: 50%;
            text-align: center;
            color: #fff;
            position: absolute;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            margin: auto;
        }

        div#div1 {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            z-index: -1;
        }

        div#div1>img {
            height: 100%;
            width: 100%;
            border: 0;
        }

        .indexdiv {
            background: #FF0000000;
            position: fixed;
            left: 0px;
            top: 0px;
            bottom: 0px;
            width: 100%;
            height: 100%;
            z-index: 101;
            filter: alpha(opacity=95);
            opacity: 0.95 !important;
            display: none;
        }

        .cmbtn {
            width: 60%;
            cursor: pointer;
            font-size: 14px;
            height: 40px;
            line-height: 40px;
            margin-top: 20px;
            border-radius: 20px !important;
            color: #fff;
            margin: 0 auto;
            background: rgb(0, 203, 227);
        }
    </style>
    </head>

    <body style="min-height: 100%; width: 100%; background-size: 100% auto; background: #f1f1f1; ">
        <input id="site_http" type="hidden" value="" />
        <div class="indexdiv"></div>
        <div style=" max-width:450px; margin:0 auto;">
            <div class="top1">
            </div>
            <div style="height: auto; overflow: hidden; ">
                <div style="width: 100%; height: auto; overflow: hidden; position:relative;">
                    <img src="<?php echo e(asset('ui1/teambg.jpeg')); ?>" style="width:100%;" />

                    <div
                        style="position: absolute; top: 60px; left: 3%; width: 60%; font-size:30px; text-align: left; color: #fff;">
                        Invite friends
                    </div>

                    <div
                        style="position: absolute; top: 100px; left: 3%; width: 90%; font-size:12px; text-align: left; color: #fff;">
                        .
                    </div>

                    <div
                        style="position: absolute; bottom: 80px; left: 1%; width: 24%; text-align: center; color: #DD660A;">
                        <div style="font-weight:bold; font-size:22px;" id="invitation">
                           
                            <input style="background: transparent; color: #DD660A;" type="text" value="<?php echo e(auth()->user()->ref_code); ?>"
                                    disabled>
                        </div>
                        <div style="font-size: 12px; color: #fff;">
                            Invitation Code
                        </div>
                    </div>
                    <div style="position: absolute; bottom: 35px; left: 3%; width: 20%; text-align: center; color: #fff;">
                        <input class="layui-btn btncopy1" id="copy1" value="Copy"
                            style="width: 90%; font-weight: 400; height: 30px; line-height: 30px; font-size: 14px; display: inline-block; background: #FF0000; color: #fff; border: 1px groove #c0c0c0; border-radius: 5px; "
                            type="button">
                    </div>
                    <div
                        style="position: absolute; bottom: 80px; left: 32%; width: 35%; text-align: center; color: #DD660A; ">
                        <div style="font-size: 12px; overflow: hidden;  height:20px; text-overflow: ellipsis; white-space: nowrap; "
                            id="link">
                            <?php echo e(route('home')); ?>?invite_code=<?php echo e(auth()->user()->ref_code); ?>

                            <input type="text" value="<?php echo e(route('home')); ?>?invite_code=<?php echo e(auth()->user()->ref_code); ?>"
                                    disabled>
                        </div>
                        
                        <div style="font-size:12px; color:#fff;">
                            Invitation link
                        </div>
                    </div>
                    <div style="position: absolute; bottom: 35px; left: 38%; width: 20%; text-align: center; color: #fff;">
                        <input class="layui-btn btncopy" id="copy" value="Copy"
                            style="width: 90%; font-weight: 400; height: 30px; line-height: 30px; font-size: 14px; display: inline-block; background: #FF0000; color: #fff; border: 1px groove #c0c0c0; border-radius: 5px; "
                            type="button">
                    </div>
                </div>
            </div>
            <div style="text-align: center; margin-bottom: 10px; background: #f1f1f1; margin-bottom:65px; ">
                <div
                    style="text-align: center; background: #fff; width: 100%; margin: 0 auto; margin-top: 10px;  padding-bottom:20px; height: auto; overflow: hidden; position: relative; ">
                    <div style="padding: 15px;  background: #fff; height: auto; overflow: hidden; padding-bottom:0px;">
                        <div style="float:left;color:#FF0000; border-left:3px solid #FF0000;">&nbsp;&nbsp;My team</div>
                        <!--<div style="float: right; font-size: 12px; color: #DD660A;" id="teamdetails">Team details >></div>-->
                    </div>
                    <div
                        style="padding-top: 10px; padding-bottom: 15px;  border-bottom: 1px solid #FF0000; height: auto; overflow: hidden; ">
                        <div
                            style="width: 19%; float: left; height: 50px; line-height: 50px; font-weight: bold; background: #FF0000; color: #fff; font-size: 22px;">
                            LV1</div>
                        <div style="width: 27%; float: left; font-size:12px; height: 50px; line-height: 25px; ">
                            <div id="P1">25%</div>
                            <div>Commission rate</div>
                        </div>
                        <div style="width: 27%; float: left; font-size: 12px; height: 50px; line-height: 25px; ">
                            <div id="task1_count"><?php echo e(teamSize($user->id, 1)); ?></div>
                            <div>Quantity</div>
                        </div>
                        <div style="width: 27%; float: left; font-size: 12px; height: 50px; line-height: 25px; ">
                            <div id="lv1_team_income"><?php echo e(number_format($level1_bonus)); ?></div>
                            <div>Bonus</div>
                        </div>
                    </div>

                    <div
                        style="padding-top: 10px; padding-bottom: 15px; border-bottom: 1px solid #FF0000; height: auto; overflow: hidden; ">
                        <div
                            style="width: 19%; float: left; height: 50px; line-height: 50px; font-weight: bold; background: #FF0000; color: #fff; font-size: 22px;">
                            LV2</div>
                        <div style="width: 27%; float: left; font-size:12px; height: 50px; line-height: 25px; ">
                            <div id="P2">5%</div>
                            <div>Commission rate</div>
                        </div>
                        <div style="width: 27%; float: left; font-size: 12px; height: 50px; line-height: 25px; ">
                            <div id="task2_count"><?php echo e(teamSize($user->id, 2)); ?></div>
                            <div>Quantity</div>
                        </div>
                        <div style="width: 27%; float: left; font-size: 12px; height: 50px; line-height: 25px; ">
                            <div id="lv2_team_income"><?php echo e(number_format($level2_bonus)); ?></div>
                            <div>Bonus</div>
                        </div>
                    </div>

                    <div style="padding-top: 10px; height: auto; overflow: hidden; ">
                        <div
                            style="width:19%;float:left; height:50px;line-height:50px; font-weight:bold; background:#FF0000; color:#fff; font-size:22px;">
                            LV3</div>
                        <div style="width: 27%; float: left; font-size:12px; height: 50px; line-height: 25px; ">
                            <div id="P3">1%</div>
                            <div>Commission rate</div>
                        </div>
                        <div style="width: 27%; float: left; font-size: 12px; height: 50px; line-height: 25px; ">
                            <div id="task3_count"><?php echo e(teamSize($user->id, 3)); ?></div>
                            <div>Quantity</div>
                        </div>
                        <div style="width: 27%; float: left; font-size: 12px; height: 50px; line-height: 25px; ">
                            <div id="lv3_team_income"><?php echo e(number_format($level3_bonus)); ?></div>
                            <div>Bonus</div>
                        </div>
                    </div>
                </div>
                <div
                    style="height: auto; overflow: hidden; margin-top: 5px; font-size: 12px; background: #fff; color: #fff; padding-top: 10px; padding-bottom: 10px;">
                    <div
                        style="float:left;  background: red; background-size: 100% 100%; width:49%; height:180px;">
                        <div style="margin-top: 50px; font-weight: bold; font-family: HarmonyOS Sans SC; font-size: 16px; width: 100%;"
                            id="t1"><?php echo e($referral_count); ?></div>
                        <div style="margin-top: 10px; font-family: HarmonyOS Sans SC; font-size: 14px; width: 100%;">Number
                            of people</div>
                    </div>
                    <div
                        style="float: left; background: red; background-size: 100% 100%; width: 49%; margin-left: 2%; height: 180px; ">
                        <div style="margin-top: 50px; font-weight: bold; font-family: HarmonyOS Sans SC; font-size: 16px; width: 100%; "
                            id="t2"> <?php echo e(number_format($level1_bonus + $level2_bonus + $level3_bonus)); ?></div>
                        <div style="margin-top: 10px; font-family: HarmonyOS Sans SC; font-size: 14px; width: 100%; ">Total
                            revenue</div>
                    </div>
                </div>
                <div
                    style="background: #fff; width: 100%; margin: 0 auto; margin-top: 5px;  padding-bottom:20px; height: auto; overflow: hidden; position: relative; ">
                    <div style="padding:15px; padding-bottom:0px; text-align:left;">
                        <div style="color:#FF0000; border-left:3px solid #FF0000;">&nbsp;&nbsp;Invitation award</div>
                    </div>
                    <div style="width:98%;margin:0 auto;">
                        <div
                            style=" text-align:left; font-size:12px;  border-radius: 10px; width: 95%; color:#666; margin: 0 auto; height: auto; overflow: hidden; margin-top: 10px; position: relative;">
                            When the friends you invite sign up and invest, you will get 25% cashback instantly.<br /><br />
                            You'll get 5% cash back when your level 2 team members invest.<br /><br />
                            You'll get 1% cash back when your level 3 team members invest.<br /><br />
                            Cash rewards will be sent to your account balance once your team members invest. You can
                            withdraw it immediately.<br /><br />
                        </div>
                    </div>
                </div>
            </div>
            <nav class="nav" style="background-size:100% 100%; height:60px; ">
                <a href="<?php echo e(route('user.home')); ?>">
                    <div url="/main/index.html" class="navtab">
                        <img src="<?php echo e(asset('ui1/nav/n11.png')); ?>" class="gray" style="height: 28px;" /> <br />
                        <span id="nav_btn1">Home</span>
                    </div>
                </a>
                <a href="<?php echo e(route('user.investment')); ?>">
                    <div url="/main/product.html" class="navtab">
                        <img src="<?php echo e(asset('ui1/nav/n22.png')); ?>" class="gray" style="height: 28px;" /> <br />
                        <span id="nav_btn2">Product</span>
                    </div>
                </a>
                <a href="<?php echo e(route('user.referrals')); ?>">
                    <div style="color: #000 !important; font-weight: bold;">
                        <img src="<?php echo e(asset('ui1/nav/n3.png')); ?>" style="height:28px;" /> <br />
                        <span id="nav_btn3">Team</span>
                    </div>
                </a>
                <a href="<?php echo e(route('user.profile.setting')); ?>">
                    <div url="/main/mine.html" class="navtab">
                        <img src="<?php echo e(asset('ui1/nav/n44.png')); ?>" class="gray" style="height: 28px;" /> <br />
                        <span id="nav_btn4">Mine</span>
                    </div>
                </a>
            </nav>
        </div>
    </body>

    </html>

    <a href="" target="_blank" style="display:none;"><span id="jump"></span></a>
    
        <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<!-- Include Clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js"></script>

<!-- Your JavaScript code -->
<script type="text/javascript">
    $(document).ready(function() {
        // Define the text to copy
        var text = '<?php echo e(route('home')); ?>?invite_code=<?php echo e(auth()->user()->ref_code); ?>';

        // Initialize Clipboard.js
        var clipboard = new ClipboardJS('.btncopy', {
            text: function() {
                return text;
            }
        });

        // Define success and error callbacks
        clipboard.on('success', function(e) {
            console.log('Text copied successfully');
            alert('Text copied successfully');
        });

        clipboard.on('error', function(e) {
            console.error('Unable to copy text');
        });

        // Click event listener for elements with class 'btncopy'
        $('.btncopy').click(function() {
            // Trigger copy action
            clipboard.copy();
        });
    });
</script>

<script type="text/javascript">
    $(document).ready(function() {
        // Define the text to copy
        var text = '<?php echo e(auth()->user()->ref_code); ?>';

        // Initialize Clipboard.js
        var clipboard = new ClipboardJS('.btncopy1', {
            text: function() {
                return text;
            }
        });

        // Define success and error callbacks
        clipboard.on('success', function(e) {
            console.log('Text copied successfully');
            alert('Text copied successfully');
        });

        clipboard.on('error', function(e) {
            console.error('Unable to copy text');
        });

        // Click event listener for elements with class 'btncopy'
        $('.btncopy').click(function() {
            // Trigger copy action
            clipboard.copy();
        });
    });
</script>

<?php $__env->stopSection(); ?>

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