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




		<link rel="stylesheet" href="<?php echo e(asset ('core/css/style.css')); ?>">
		<style type="text/css">
		    
			/*.fosm {font-size: 16px;padding-left: 4px;color: #868D9A;font-weight: 100;}*/
			/*.txt-green {background-color: #29a93f;color: #fff;padding: 5px 8px;border-radius: 4px;}*/
			/*.txt-red {background-color: #F34954;color: #fff;padding: 5px 8px;border-radius: 4px;}*/
			/*.transaction-list li {padding: 16px 10px;border-radius: 4px;margin: 0 0 10px;box-shadow: 0px 0px 9px 2px rgba(0, 0, 0, 0.04);background: #fff;}*/
			/*.flex-column img {max-width: 40px;max-height: 40px;}*/
			/*.resources-card-wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-pack: distribute;justify-content: space-around;}*/
			/*.buy-card {width: 34%;padding: 14px 0px;border-radius: 10px;}*/
			/*.rien {float: right;margin-top: -26px;}*/
			/*.uine {color: #5f5f5f;}*/
			/*.uine span {display: block;font-size: 20px;color: #000;padding-top: 2px;font-weight: 700;}*/
			/*.sectionTitle .title h1 {font-size: 18px;color: #ccc;}*/
			/*.pmew {background: url(/static/img/team.png) no-repeat;padding: 20px 10px;border-radius: 4px;background-size: 100%;}*/
			/*#tit span {float: left;width: 32%;text-align: center;color: #000;margin: 2px;background: #ccc;border-radius: 2px;padding: 2px 0;}*/
			/*#tit span.select {color: var(--white);border-radius: 2px;background: #0160bf;}*/
			/*#tit {height: 30px;}*/
			/*.vip-muted {color: var(--white);font-size: 12px;font-weight: 400;background: var(--yellow);width: 80px;text-align: center;border-radius: 4px;margin-left:5px;}*/
			
			
			.appHeader{background-color: #1C57A8;}
			.teamtop{width: 100%;height: 156px;background: #ffffff;border-radius: 16px;}
			.info{ display: flex;display: -webkit-flex;flex-direction: row ;}
			.levelt{width: 58px;height: 58px;background: #EEB31C;border-radius: 12px;line-height:58px;text-align:center;margin:12px;}
			.uname{color: #333333;opacity:0.7;margin-top:16px;}
			.c-label{color: #333333;opacity:0.7;font-size:12px;}
			.label{height: 32px;font-size: 16px;font-weight: 600;line-height: 29px;}
			.name{width: 22px;height: 16px;font-size: 14px;font-weight: 400;line-height: 16px;}
			.data{width: 90%;height: 60px;background: #F3F9FF;border-radius: 12px;margin:auto;}
			.inlineh2{width: 1px;height: 40px;margin-top: 10px;border: 1px solid #000000;opacity:0.1;}
			.desc{width:72px;display: flex;display: -webkit-flex;flex-direction: row ;margin:auto;text-align:left;}
			.iconself{width: 35px;height: 35px;margin-top:18px;}
			.iconself img{width: 30px;height: 30px;}
			.tview{margin-top:16px;margin-left:4px;}
			/*.teamrule{width: 100%;height: 40px;background: #F0F0F0;border-radius: 100px;margin-top:20px;color:#333333;}*/
			#teamtit span {float: left;width: 33%;text-align: center;color: #333333;border-radius: 100px;background: #F0F0F0;height: 40px;line-height:40px;}
			#teamtit span.select {color: #333333;border-radius: 100px;background: #ffffff;}
			#teamtit {height: 40px;background: #F0F0F0;border-radius: 100px;margin-top:20px;}
			.tablebt{background: #F2F9FF;margin-bottom:0;}
			.loglist{padding-left: 0;list-style: none;}
			.loglist li{padding: 10px;background:#fff;}
			h4{font-size:14px;}
			.content{
			     padding-top: 56px;
			 }
		</style>
	</head>




	<body style="background-color:#F8F8FB;">

		<!-- Page loading -->
		<div class="loading">
			<div class="spinner-grow"></div>
		</div>
		<div class="appHeader">
			<div class="left">
				<a href="<?php echo e(route ('user.home')); ?>" class="icon goBack">
					<i class="icon ion-ios-arrow-back"></i>
				</a>
			</div>
			<div class="pageTitle">Team</div>
		</div>
		<?php
    use App\Models\Transaction;
    $authUserId = Auth::id();
    $referralCommission = Transaction::where('user_id', $authUserId)
                                    ->where('remark', 'referral_commission')
                                    ->sum('amount');
    $formattedReferralCommission = number_format($referralCommission, 0, '.', '');
?>

<?php
  $authUser = Auth::user();
  $userCount = App\Models\User::where('ref_by', $authUser->id)->count();
?>



		<div  class="content pb-2">
		    <div class="appContent pd-0 mt-3">
		        <div class="teamtop">
		            <div class="info">
		                <div class="levelt">Team</div>
		                <div class="uname">
		                    <div class="label">Accounts or Commission</div>
		                    <div class="name">Details</div>
		                </div>
		            </div>
		            <div class="data">
        				<div class="card-info d-flex" style="text-align:center;">
        					<div class="holder-info col-6">
        					    <div class="desc">
            					    <div class="iconself"><img src="<?php echo e(asset ('core/core/img/yq.svg')); ?>"></div>
            					    <div class="tview">
                						<h6 class="mb-0">     <?php echo e($userCount); ?></h6>
                						<div class="c-label">Invite</div>
            						</div>
        						</div>
        					</div>
        					
        					<div class="inlineh2"></div>
        					<div class="holder-info col-6">
        					    <div class="desc">
            					    <div class="iconself"><img src="<?php echo e(asset ('core/core/img/team.svg')); ?>"></div>
            					    <div class="tview">
            					        <h6 class="mb-0"><?php echo e($referralCommission); ?><?php echo e($general->cur_text); ?></h6>
            						    <div class="c-label">Assets</div>
            					    </div>
        					    </div>
        						
        					</div>
        				</div>
        			</div>
		        </div>
		        <div id="teamtit" class="teamrule">
					<span class="select" data-id='1'>Level 1 </span>
					<span data-id='2'>Level 2</span>
					<span data-id='3'>Level 3  </span>
					
					
					
					
					
					
					
				</div>
				
				<div id="wrap">
					<ul class="tablebt loglist mt-2">
						<li>
							<div class="d-flex align-items-center justify-content-between">
								<div class="d-flex align-items-center">
									<div class="ml-10">
										<h4 class="coin-name">Account</h4>

									</div>
								</div>
								<div class="d-flex align-items-center">
									<div class="ml-10">
										<h4 class="coin-name">Referrer</h4>

									</div>
								</div>
								<div class="d-flex align-items-center">
									<div class="ml-10">
										<h4 class="coin-name">Assets</h4>
									</div>
								</div>


							</div>
						</li>
					</ul>
					<ul class="loglist rq">
					            <?php if($user->allReferrals->count() > 0 && $maxLevel > 0): ?>
            <div class="card">
                <div class="card-body">
                    <div class="treeview-container">
                        <ul class="treeview">
                        <li class="items-expanded"> <?php echo e($user->fullname); ?> ( <?php echo e($user->username); ?> )
                                <?php echo $__env->make($activeTemplate.'partials.under_tree',['user'=>$user,'layer'=>0,'isFirst'=>true], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <?php endif; ?>
        </div>
    </div>
</div>
	
						
					</ul>
				</div>
		        
		    </div>
		</div>







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

<?php $__env->startPush('style'); ?>
    <link href="<?php echo e(asset('assets/global/css/jquery.treeView.css')); ?>" rel="stylesheet" type="text/css">
<?php $__env->stopPush(); ?>
<?php $__env->startPush('script'); ?>
<script src="<?php echo e(asset('assets/global/js/jquery.treeView.js')); ?>"></script>
<script>
    (function($){
    "use strict"
        $('.treeview').treeView();
        $('.copyBoard').click(function(){
                var copyText = document.getElementsByClassName("copyURL");
                copyText = copyText[0];
                copyText.select();
                copyText.setSelectionRange(0, 99999);

                /*For mobile devices*/
                document.execCommand("copy");
                $('.copyText').text('Copied');
                setTimeout(() => {
                    $('.copyText').text('Copy');
                }, 2000);
        });
    })(jQuery);
</script>
<?php $__env->stopPush(); ?>

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