<?php $userBalance = 'balance'; 
	if($user->user_currency != 'NGN'){
		$userBalance = 'usdt_balance'; 
	} ?>
@extends($activeTemplate.'layouts.users')

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

@section('content')
    <div class="recharge-wrap">
        <div class="navbar">
            <span onclick="onBack()"><i></i></span>
            <span></span>
            <span></span>
        </div>

        <h5 style="margin-top:1rem">
            <img src="{{ asset($activeTemplateTrue.'img/ic_coim@2x.png') }}" alt="" srcset=""> Existing balance
        </h5>
        <h6 class="ye">{{ $user->user_currency_sym }}{{ showAmount($user->$userBalance,2) }}</h6>
        <div class="tab">
            <div onclick="onJump(&#39;{{ route('user.deposit') }}&#39;)">Recharge</div>
            <div class="active">Record</div>
        </div>

        <div class="centnen">
            <div class="wrap">
                <div class="tips-box">
                    <h2>
                        <img src="{{ asset($activeTemplateTrue.'img/ic_help@2x.png') }}" alt=""> User topup history.
                    </h2>
                    <p>
                        If you have any pending topup that has not reflected kindly contact support team for assistance.
                    </p>
                </div>
				<?php $jStK = array('Pending','Successful','Pending','Cancelled'); ?>
				<ul class="listss" style="width: 100%; margin: 0 auto; position: relative; margin-top: 10px; height: auto; overflow: hidden; padding-top:10px; padding-bottom:64px;" id="itemlist">
					@forelse($logs as $data)
					<li style="height:auto;padding-top:4px;overflow:hidden;color:#333;background:#2E333E;margin:0 auto; width:98%;border-radius: 5px; margin-top:10px;padding-bottom:15px;border-bottom:1px solid #eee;">
						<div style="padding:1px;">
							<div style="float:left;width:45%; margin-left:5%">
								<div style="height:27px; line-height:27px;">
									<span style ="padding:3px; padding-left: 0px;padding-right:10px;border-radius: 10px; font-weight:bold;color: #fff;">{{ $data->currency }}</span>
								</div>
								<div style="height:27px; line-height:27px;">
									<span style="padding:3px; padding-left: 0px;padding-right:10px;border-radius: 10px; color: #fff;">{{ $data->trx }}</span>
								</div>
								<div style="height:27px; line-height:27px;font-size:12px;color:#999;">Charge: {{ config('settings')->cur_sym }}{{ showAmount($data->charge) }}</div>
								<div style="height:27px; line-height:27px;font-size:12px; color:#999;">{{ $data->created_at->format('dS F Y, H:i') }}</div>
							</div>
							<div style="float:left;width:45%; text-align:right; margin-right:5%">
								<div style="height:27px; line-height:27px; font-size:20px; font-family: Roboto Condensed-Regular,Roboto Condensed;font-weight: 400;color: #ddaaaa;">{{ showAmount($data->amount) }}</div>
								<div style="height:27px; line-height:27px;font-size:12px;color:#999;margin-top:-7px;">&nbsp;amount</div>
								<div class="{{ strtolower($jStK[$data->status]) }}" style="height:27px; line-height:27px;font-size:12px;color:#999;">{{ $jStK[$data->status] }}</div>
								<div style="height:27px; line-height:27px;font-size:12px;color:#999;margin-top:-7px;">Type: <span style="font-weight:900;">Recharge</span></div>
								@if( $data->status == 0 || $data->status == 2 )
								<div style="height:27px; line-height:27px;font-size:12px;color:#999;margin-top:-7px;"><span onclick="confirmBox('DELETE REQUEST','Are you sure you want to cancel this pending deposit request not yet confirmed. cancelling means you did not pay, it should be cancelled.','{{ route('user.deposit.cancel',$data->id) }}');" style="cursor:pointer;border-radius:3px;padding:2px 4px;font-weight:900;border:1px solid #db5757;color:#e1e1b4;">Cancel request</span></div>
								@endif
							</div>

							@if( $data->admin_feedback )
							<div style='margin-left:5%; color:#ff6a00;float:left;width:95%;'>{{ $data->admin_feedback }}</div>
							@endif
						</div>
					</li>
					@empty
					<li>
						<div style="padding:2px; width:95%; margin:0 auto; margin-top:50px;">
							<div style="border-radius: 5px; color:#fff; text-align:center; margin-top:35px;position:relative;">
								<img src="/assets/images/no.png" style=" width:100%;" /><br>
							</div>
						</div>
						<div class="layui-flow-more">No deposit request data</div>
					</li>
					@endforelse
				</ul>

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

@endsection

@push('script')
@endpush
