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

@push('style')
	<link rel="stylesheet" href="{{ asset($activeTemplateTrue.'css/history.css') }}{{$catch}}">
	<style>
		.typeitem {float: left;width:calc(100vw / 3 );height: auto;overflow: hidden;margin-left: 0px;}
		.over {border-bottom: 1px solid #b8e949;}.successful{color:#28c76f !important;font-weight:800;}
		.pending{color:#ff9f43 !important;font-weight:800;}.cancelled{color:#1e9ff2 !important;font-weight:800;}
	</style>
@endpush

@section('content')
<uni-app class="uni-app--maxwidth">
	<uni-page data-page="pages/record/balance">
		<uni-page-wrapper class="Trithst">
			<uni-page-body>
				<uni-view data-v-c23c4702="" class="content">
					<uni-view data-v-58cb4ed7="" data-v-5c2fef75="" class="back-title">
						<span data-href="{{ route('user.profile') }}" class="returnBank"><img src="{{ asset($activeTemplateTrue.'img/back.png') }}" style="margin-left:12px;width:28px;" /></span>
						<span data-v-58cb4ed7="" class="title-txt">{{ucfirst($type)}} details</span>
					</uni-view>

					<?php $jStK = array('Initiated','Successful','Pending','Cancelled'); ?>
					<uni-view data-v-d40c0b3e="" class="content color-bg" style="height: auto;">

						<div style=" width: 100%; margin: 0 auto; margin-top: 1px; text-align: center; background: #149552; color: #FFF; position: relative; height: auto; overflow: hidden;display:flex;" class="tabs">
							<div class="typeitem @if($type=='deposit') active over @endif linkBTN" value="1" data-href="{{ route('user.transaction.type', ['type' => 'deposit']) }}">
								<div style="font-weight:700;padding: 10px; height: 30px; line-height:30px; overflow: hidden;">Recharge </div>
							</div>
							<div class="typeitem @if($type=='withdraw') active over @endif linkBTN" value="2" data-href="{{ route('user.transaction.type', ['type' => 'withdraw']) }}">
								<div style="font-weight:700;padding: 10px; height: 30px; line-height: 30px; overflow: hidden; ">Withdraw</div>
							</div>
							<div class="typeitem @if($type=='others') active over @endif linkBTN" value="3" data-href="{{ route('user.transaction.type', ['type' => 'others']) }}">
								<div style="font-weight:700;padding: 10px; height: 30px; line-height: 30px; overflow: hidden; ">Others</div>
							</div>
						</div>

                        <uni-view data-v-d40c0b3e="" class="content-inset">
							<uni-view data-v-d40c0b3e="" id="list" class="list">

								@forelse($transactions as $data)
                                    @php
                                        $status_text = 'Rejected';
                                        if($data->status == '1'){
                                            $status_text = 'Successful';
                                        }elseif($data->status == '2'){
                                            $status_text = 'Pending';
                                        }
                                    @endphp
								<uni-view data-v-d40c0b3e="">
									<p data-v-d40c0b3e="">
										<span data-v-d40c0b3e="">{{ $data->details }}</span>
										<span data-v-d40c0b3e="" class="">{{ showAmount($data->amount) }}</span>
									</p>
									<p data-v-d40c0b3e="">
										<span data-v-d40c0b3e="">{{ $data->created_at->format('dS F Y, H:i') }}</span>
										<span data-v-d40c0b3e="">{{ $status_text }}</span>
									</p>

									@if( $data->admin_feedback )
									<p data-v-d40c0b3e=""><span data-v-d40c0b3e="">{{ $data->admin_feedback }}</span></p>
									@endif

								</uni-view>
								@empty
								@endforelse

							</uni-view>
						</uni-view>

						<uni-view data-v-0af76499="" data-v-d40c0b3e="" class="uni-load-more">
							<uni-text data-v-0af76499="" class="uni-load-more__text" style="color: rgb(119, 119, 119);"><span>No More Data</span></uni-text>
						</uni-view>

					</uni-view>
				</uni-view>
			</uni-page-body>
		</uni-page-wrapper>
	</uni-page>
</uni-app>
@endsection

@push('script')
@endpush
