<?php $__env->startSection('content'); ?>

    <body data-theme-color="color-blue">
        <div class="page-wraper">


            <style>
                .header .header-content .mid-content {
                    flex: 1;
                    text-align: left;
                }

                .header {
                    background-color: #ed7016;
                    min-height: 55px;
                    z-index: 2;
                    border-bottom: 0px solid #dddddd;
                }

                #preloader {
                    top: 0;
                }

                i.fa-solid.fa-bell {
                    font-size: 22px;
                    color: white;
                    margin-top: 12px;
                    padding-right: 7px;
                }

                i.fa-solid.fa-globe {
                    font-size: 22px;
                    color: white;
                    margin-top: 12px;
                    padding-right: 7px;
                }

                .header .sticky-header {
                    top: 0px;
                    background: #ed7016;
                }

                .toast.style-1.toast-danger {
                    background-color: #1e1e1e5e;
                    color: #fff;
                    border: 0px white solid;
                    backdrop-filter: blur(5px);
                }

                .toast.style-1 .toast-body {
                    display: flex;
                    align-items: center;
                    padding: 14px;
                }

                .toast.style-1.toast-danger .toast-content strong {
                    color: #fff;
                    font-weight: 600;
                }
            </style>


            <!-- Header -->
            <header class="header">
                <div class="main-bar">
                    <div class="container">
                        <div class="header-content">

                            <div class="mid-content">
                                <h5 class="mb-0">Team Work</h5>
                            </div>
                            <!--              <div class="right-content">-->
                            <!--                  <a href="javascript:void(0);" class="menu-toggler">-->
                            <!--	<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">-->
                            <!--		<path opacity="0.4" d="M16.0755 2H19.4615C20.8637 2 22 3.14585 22 4.55996V7.97452C22 9.38864 20.8637 10.5345 19.4615 10.5345H16.0755C14.6732 10.5345 13.537 9.38864 13.537 7.97452V4.55996C13.537 3.14585 14.6732 2 16.0755 2Z" fill="#a19fa8"/>-->
                            <!--		<path fill-rule="evenodd" clip-rule="evenodd" d="M4.53852 2H7.92449C9.32676 2 10.463 3.14585 10.463 4.55996V7.97452C10.463 9.38864 9.32676 10.5345 7.92449 10.5345H4.53852C3.13626 10.5345 2 9.38864 2 7.97452V4.55996C2 3.14585 3.13626 2 4.53852 2ZM4.53852 13.4655H7.92449C9.32676 13.4655 10.463 14.6114 10.463 16.0255V19.44C10.463 20.8532 9.32676 22 7.92449 22H4.53852C3.13626 22 2 20.8532 2 19.44V16.0255C2 14.6114 3.13626 13.4655 4.53852 13.4655ZM19.4615 13.4655H16.0755C14.6732 13.4655 13.537 14.6114 13.537 16.0255V19.44C13.537 20.8532 14.6732 22 16.0755 22H19.4615C20.8637 22 22 20.8532 22 19.44V16.0255C22 14.6114 20.8637 13.4655 19.4615 13.4655Z" fill="#a19fa8"/>-->
                            <!--	</svg>-->
                            <!--</a>-->
                            <!--              </div>-->
                        </div>
                    </div>
                </div>
            </header>





            <!--   <div id="preloader">-->
            <!--	<div class="spinner"></div>-->
            <!--</div>-->
            <meta name="theme-color" content="#ed7016">

            <style>
                body {
                    background-color: #fff;
                }

                .profile-header {
                    color: #3d3d3d;
                    padding: 12px 29px;
                    text-align: center;
                    border-radius: 15px;
                    background: linear-gradient(180deg, #120938, #0b0822) !important;
                    position: fixed;
                    width: 101%;
                    bottom: 54px;
                    left: 50%;
                    transform: translateX(-50%);
                }

                .text-white {
                    --bs-text-opacity: 1;
                    color: rgb(7 125 255) !important;
                    font-weight: 700;
                    font-size: 31px;
                }

                .w-32 {
                    width: 32%;
                }

                .header {
                    background: #9ed230 !important;
                    min-height: 40px;
                    border-bottom: 0px solid #dddddd;
                    border-bottom-left-radius: 0%;
                    border-bottom-right-radius: 0%;
                }

                .common_card {
                    background: rgba(255, 255, 255, 1);
                    border-radius: 8px 8px 8px 8px;
                    padding: 15px;
                    margin-bottom: 20px;
                    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
                }

                .common_card .common_card_content {
                    background: #FFFFFF;
                    border-radius: 8px;
                }

                .common_explain {
                    border-left: 4px solid #EBD8A3;
                    padding-left: 10px;
                    font-family: Arial, Arial;
                    font-weight: 700;
                    font-size: 18px;
                    color: #3D3D3D;
                    line-height: 21px;
                }

                .common_content {
                    margin-top: 15px;
                    font-family: Arial, Arial;
                    font-weight: 400;
                    font-size: 14px;
                    color: #2A415C;
                    line-height: 22px;
                }

                .common_content p {
                    margin-bottom: 15px;
                }

                .card-body {
                    padding: 0px 0px 7px 0px;
                }

                h5.mb-0 {
                    color: white;
                    margin-top: 3px;
                }

                .header .header-content .mid-content {
                    flex: 1;
                    text-align: center;
                }

                .code-card {
                    max-width: 381px;
                    height: 94px;
                    background: url(<?php echo e(asset('assets/app/img/download-43.png')); ?>) no-repeat;
                    background-size: 100% 100%;
                    margin-top: 16px;
                    box-sizing: border-box;
                }

                .code-text {
                    font-size: 16px;
                    font-weight: 600;
                    margin-top: 5px;
                    margin-left: 10px;
                    color: #000000;
                }

                .invite-link {
                    max-width: 381px;
                    height: 60px;
                    margin-left: -30px;
                    margin-top: 4px;
                }

                .f26 {
                    font-size: 14px;
                }

                .f600 {
                    font-weight: 600;
                }

                .tooltips {
                    width: 65px;
                    height: 36px;
                    background: #000;
                    color: #fff;
                    text-align: center;
                    line-height: 36px;
                    border-radius: 8px;
                }

                div#copyBtn {
                    width: 65px;
                    height: 36px;
                    background: #000;
                    color: #fff;
                    text-align: center;
                    line-height: 36px;
                    border-radius: 8px;
                }

                .d-b-cd {
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                }

                .team-info {
                    max-width: 381px;
                    margin-top: -22px;
                    height: 108px;
                    column-gap: 17px;
                }

                .team-info-item {
                    width: 181px;
                    height: 76px;
                    background: #f1f2f3;
                    border-radius: 8px;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    padding: 10px 0;
                    box-sizing: border-box;
                    align-content: stretch;
                }

                .level-wrap {
                    max-width: 381px;
                    height: 130px;
                    background: url(<?php echo e(asset('assets/app/img/download-44-11zon.png')); ?>) no-repeat;
                    background-size: 100% 100%;
                    margin-top: 16px;
                    padding: 10px;
                    box-sizing: border-box;
                }

                .d-b-c {
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                }

                .level-title {
                    width: 209px;
                    height: 26px;
                }

                .detail {
                    width: 64px;
                    height: 31px;
                    background: #000;
                    color: #fff;
                    text-align: center;
                    line-height: 33px;
                    border-radius: 8px;
                    font-size: 12px;
                }

                .level-bottom.d-b-c {
                    width: 100%;
                    height: 61px;
                    margin-top: 12px;
                }

                .level-bottom-item {
                    width: 142px;
                    height: 61px;
                    background: #fff;
                    border-radius: 8px;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    padding: 8px 10px;
                    box-sizing: border-box;
                }

                .profile-header {
                    display: none;
                }

                /*-------------------------------------------------------------------------------------------------------------------------------------------*/
            </style>
            <div class="page-content">

                <div class="content-inner pt-0">
                    <div class="container fb">

                        <div class="profile-header bg-primary">
                            <div class="row">
                                <div class="col-6">
                                    <div class="mb-4">
                                        <p class="mb-1" style="color: white;font-weight: bold;"><i
                                                class="fa-solid fa-envelope"></i> Invite Link</p>
                                        <div class="input-group">
                                            <input type="text" class="form-control"
                                                value="<?php echo e(route('home')); ?>?invite_code=<?php echo e(auth()->user()->ref_code); ?>"
                                                id="inviteLink" readonly="">
                                            <button class="btn btn-outline-primary"
                                                onclick="copyToClipboard(document.getElementById('inviteLink').value)">Copy</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>



                        <div class="code-card">
                            <div class="code-text">Copy the invitation link</div>
                            <div class="invite-link d-b-c" style="margin-left: -19px;">
                                <div>
                                    <div class="f26">Invitation Code</div>
                                    <div class="f34 f600 mt10" id="inviteCode">
                                        <?php echo e($user->ref_code); ?> </div>
                                </div>
                                <div id="copyBtn" class="invite-copy"
                                    onclick="copyToClipboard(document.getElementById('inviteLink').value)"
                                    style="margin-left: 47px;">Copy</div>
                            </div>
                        </div>

                        <div class="w700 mt30 f600 f36" style="margin-top: 12px;margin-bottom:12px;color: #0b0b0b;">Team
                            information</div>

                        <div class="team-info d-b-cd">
                            <div class="team-info-item">
                                <div class="f28"><span>Total size</span></div>
                                <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                    <span><?php echo e($level1->count() + $level2->count() + $level3->count()); ?></span></div>
                            </div>
                            <div class="team-info-item">
                                <div class="f28"><span>Total Recharge</span></div>
                                <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                    <span><?php echo e($general->cur_sym); ?><?php echo e(number_format(teamDeposit($user->id, 1) + teamDeposit($user->id, 2) + teamDeposit($user->id, 3))); ?></span>
                                </div>
                            </div>
                        </div>


                        <!---------------------------------------------------------------------------1-Level------------------------------------------------------------------------------------------------>

                        <div class="level-wrap" style="margin-top: -3px;">
                            <div class="level-top d-b-c">
                                <div class="level-title">
                                    <div
                                        style="background-image: url('/static/level1-title.png'); background-position: 0% 0%; background-size: 100% 100%; background-repeat: no-repeat;">
                                    </div>
                                    <img src="<?php echo e(asset('assets/app/img/icon-level-3.png')); ?>" draggable="false"
                                        style="width: 23% ! important;"> Level 1
                                </div>
                                <div class="detail" onclick="window.location.href='<?php echo e(route('user.referrals.lv1')); ?>'">
                                    Details</div>
                            </div>
                            <div class="level-bottom d-b-c">
                                <div class="level-bottom-item">
                                    <div class="f26 gray6">Team size</div>
                                    <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                        <?php echo e($level1->count()); ?> </div>
                                </div>
                                <div class="level-bottom-item">
                                    <div class="f26 gray6">Team Recharge</div>
                                    <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                        <?php echo e($general->cur_sym); ?><?php echo e(number_format(teamDeposit($user->id, 1))); ?></div>
                                </div>
                            </div>
                        </div>






                        <!---------------------------------------------------------------------------2-Level------------------------------------------------------------------------------------------------>


                        <div class="level-wrap">
                            <div class="level-top d-b-c">
                                <div class="level-title">
                                    <div
                                        style="background-image: url('/static/level1-title.png'); background-position: 0% 0%; background-size: 100% 100%; background-repeat: no-repeat;">
                                    </div>
                                    <img src="<?php echo e(asset('assets/app/img/icon-level-1.png')); ?>" draggable="false"
                                        style="width: 23% ! important;"> Level 2
                                </div>
                                <div class="detail" onclick="window.location.href='<?php echo e(route('user.referrals.lv2')); ?>'">
                                    Details</div>
                            </div>
                            <div class="level-bottom d-b-c">
                                <div class="level-bottom-item">
                                    <div class="f26 gray6">Team size</div>
                                    <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                        <?php echo e($level2->count()); ?> </div>
                                </div>
                                <div class="level-bottom-item">
                                    <div class="f26 gray6">Team Recharge</div>
                                    <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                        <?php echo e($general->cur_sym); ?><?php echo e(number_format(teamDeposit($user->id, 2))); ?> </div>
                                </div>
                            </div>
                        </div>


                        <!-----------------------------------------------------------------------3-Level--------------------------------------------------------------------------------------------------->

                        <div class="level-wrap">
                            <div class="level-top d-b-c">
                                <div class="level-title">
                                    <div
                                        style="background-image: url('/static/level1-title.png'); background-position: 0% 0%; background-size: 100% 100%; background-repeat: no-repeat;">
                                    </div>
                                    <img src="<?php echo e(asset('assets/app/img/icon-level-3.png')); ?>" draggable="false"
                                        style="width: 23% ! important;"> Level 3
                                </div>
                                <div class="detail" onclick="window.location.href='<?php echo e(route('user.referrals.lv3')); ?>'">
                                    Details</div>
                            </div>
                            <div class="level-bottom d-b-c">
                                <div class="level-bottom-item">
                                    <div class="f26 gray6">Team size</div>
                                    <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                        <?php echo e($level3->count()); ?> </div>
                                </div>
                                <div class="level-bottom-item">
                                    <div class="f26 gray6">Team Recharge</div>
                                    <div class="f36 fbi" style="font-weight: bold;font-size: 18px;">
                                        <?php echo e($general->cur_sym); ?><?php echo e(number_format(teamDeposit($user->id, 3))); ?> </div>
                                </div>
                            </div>
                        </div>

                        <div class="common_card position"
                            style="margin-top: 15px;width: 100%;margin-left: 0px;margin-bottom: 100px;">
                            <div class="common_card_content">
                                <div class="demo-login-container" style="">
                                    <p class="common_explain">Explain</p>
                                    <div class="common_content">
                                        <p>
                                            1. Create your own team and get up to
                                            <?php echo e($general->lv1); ?>% referral reward which you can withdraw&nbsp;directly
                                        </p>
                                        <p>
                                            2. Invite your friends and ask them to invest. If your friend recharges and
                                            purchases the plan, only then will you&nbsp;get&nbsp;commission.
                                        </p>
                                        <p>
                                            3. If you want extra reward then complete the mission (view mission) you will
                                            get reward on every&nbsp;investment
                                        </p>
                                        <p>
                                            4. If you want more extra reward then message Customer Care you
                                            will&nbsp;get&nbsp;more&nbsp;task
                                        </p>
                                    </div>
                                </div>
                            </div>


                            <!-- Menubar -->
                            <div class="menubar-area">
                                <div class="toolbar-inner menubar-nav">
                                    <a href="<?php echo e(route('user.home')); ?>" class="nav-link">
                                        <img src="<?php echo e(asset('assets/app/img/home.png')); ?>" style="width: 40px;">
                                        <label style="font-size:12px; font-weight: 600; margin-top:-5px;">Home</label>
                                    </a>
                                    <a href="<?php echo e(route('user.investment')); ?>" class="nav-link">
                                        <img src="<?php echo e(asset('assets/app/img/plan.png')); ?>" style="width: 40px;">

                                        <label style="font-size: 12px; font-weight: 600; margin-top:-5px;">Plans</label>
                                    </a>
                                    <a href="<?php echo e(route('user.referrals')); ?>" class="nav-link">
                                        <img src="<?php echo e(asset('assets/app/img/team_a.png')); ?>" style="width: 40px;">
                                        <label
                                            style="font-size: 12px; font-weight: 600; margin-top:-5px;color: #6fa31d;">Team</label>
                                    </a>
                                    <a href="<?php echo e(route('user.profile.setting')); ?>" class="nav-link">
                                        <img src="<?php echo e(asset('assets/app/img/profile.png')); ?>" style="width: 40px;">

                                        <label style="font-size: 12px; font-weight: 600; margin-top:-5px;">Profile</label>
                                    </a>
                                </div>
                            </div>
                            <!-- Menubar -->

                            


                        </div>


                        <script>
                            function copyToClipboard(text) {
                                navigator.clipboard.writeText(text).then(() => {
                                    alert("Copied Successfully");
                                });
                            }

                            function shareLink() {
                                const url = '<?php echo e(route('home')); ?>?invite_code=<?php echo e(auth()->user()->ref_code); ?>';
                                if (navigator.share) {
                                    navigator.share({
                                        title: "Join <?php echo e($general->sitename); ?>  Family",
                                        text: "Use my referral code and join the app to earn rewards.",
                                        url: url,
                                    }).catch(console.error);
                                } else {
                                    notify("error", "error while sharing");
                                }
                            }
                        </script>


                    </div>
                </div>
            </div>


            <style>
                .menubar-area .toolbar-inner .nav-link.active:after,
                .menubar-area .toolbar-inner .menu-toggler.active:after {
                    content: "";
                    position: absolute;
                    bottom: -11px;
                    height: 5px;
                    background: #340166;
                }

                .menubar-area {
                    position: fixed;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    background: #fff;
                    padding: 20px;
                    z-index: 999;
                    padding-top: 12px !important;
                    padding-bottom: 10px !important;
                    border-radius: 8px 8px 0px 0px;
                    box-shadow: 0 12px 26px 0 rgba(0, 0, 0, 0.3);
                }

                a:hover,
                a:focus,
                .fa-solid,
                a.active,
                .fa-solid.active {
                    text-decoration: none;
                    outline: none;
                    color: var(--primary-hover);
                }
            </style>




        </div>

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

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