@extends($activeTemplate.'layouts.users')
@php $pCentTotal = 0; @endphp

@push('style-lib')
	<link rel="stylesheet" href="{{ asset($activeTemplateTrue.'css/invitation.css') }}{{$catch}}">
@endpush

@section('content')
	@foreach($levels as $level ) @php $pCentTotal += $level->percent @endphp @endforeach
    <uni-app class="uni-app--showtabbar uni-app--maxwidth">
        <uni-page data-page="pages/index/my">
            <uni-page-wrapper class="inVust">
                <uni-page-body>
                    <uni-view data-v-0189cbc8="" class="content" style="overflow: visible;padding-top:0px">

						<h2 class="title" style="font-size:.50rem;padding-top:2.0rem;position: relative;text-align: center;text-align: -webkit-center;">
							<div class="favicon"><img src="{{getImage(imagePath()['logoIcon']['path'] .'/favicon.png')}}{{$catch}}" alt /></div>
							<small class="login kJse" style="font-size:13px;color:#FFF"><br/>Copy and share your invite details to earn more.<br/><br/></small>
						</h2>

						<div id="appCapsule" class="pb-2">
							<div class="appContent mtbe">
								<section class="container dew">
									<div class="demo pt-3">
										<p class="m-0 text-center text-dark">SCAN QR CODE</p>
										<div class="share-qrcode">
											<div class="qrcode-img" id="qrcode" title="{{ $link }}">
											<img src="{{ $QRCode}}" alt="" width="180" height="180" style="display: initial;width:180px;height:180px;">
											</div>
										</div>
									</div>

									<div class="transfer-box-bottom">
										<img src="{{ asset($activeTemplateTrue.'img/QRcode_bg.png') }}{{$catch}}">
									</div>
									<div class="demo1 pb-3">
										<div class="copy-code">
											<p class="mb-2 mt-2">My invitation code</p>
											<span id="foo" class="pt-1">{{$code}}</span>
										</div>
										<button class="btn" data-clipboard-text="{{ $link }}" onclick="copyText();">Copy</button>
									</div>
								</section>
							</div>
						</div>

						<uni-view data-v-5c2fef75="" class="rules" style="margin:2px 25px;">
							<h3 data-v-5c2fef75="">Invitation rules explanation</h3>
							Invite first-level subordinates to receive 8% daily interest commission <br><br>Invite second-level subordinates to receive 3% daily interest commission <br><br>Invite third-level subordinates to receive 1% daily interest commission <br><br>Guild team members on how to successfully receive their mining machines income <br><br>Invitation rewards and team daily interest commission is settled in the users balance wallet and can either be used to rent mining machines or withdrawn to employees bank account at anytime
							
								<!--p>
									{{$pCentTotal}}% daily fixed income per product.<br/>
									Product return every 24 hours.<br/>
									{{ $levels->count() }} levels of promotional income: @foreach($levels as $level ) {{ $level->percent }}%@if(!$loop->last), @endif @endforeach
									<br/>Minimum withdrawal {{ config('settings')->cur_sym }}1,000.
									<br/>Withdrawal fee: 10%.
								</p-->
						</uni-view>
						<br/><br/><br/><br/>
					</uni-view>
                </uni-page-body>
            </uni-page-wrapper>
        </uni-page>
		@include($activeTemplate.'layouts.menu',['activeLink'=>'profile'])
	</uni-app>
@endsection


@push('script')
<script>
	var text = '{{ $link }}';
    function copyText() {
		var $temp = $("<input>");
		$("body").append($temp);
		$temp.val(text).select();
		document.execCommand("copy");
		$temp.remove();
		Toast('Data copied to clipboard!');
    }
</script>
@endpush