<x-admin.layout :hasExtraSettings="false">
        <div class="nk-block-head nk-block-head-sm">
            <div class="nk-block-between g-3">
                <div class="nk-block-head-content">
                    <h3 class="nk-block-title page-title">Users / <strong class="text-primary small">{{ $user->lastname.' '.$user->firstname }}</strong></h3>
                    <div class="nk-block-des text-soft">
                        <ul class="list-inline">
                            <li>User ID: <span class="text-base">UD00{{ $user->id }}</span></li>
                            <li>Join Date: <span class="text-base">{{ date_format(date_create($user->created_at),'d M, Y h:i A') }}</span></li>
                        </ul>
                    </div>
                </div>
                <div class="nk-block-head-content">
                    <a href="{{ route('admin.users') }}" class="btn btn-outline-light bg-white d-none d-sm-inline-flex"><em class="icon ni ni-arrow-left"></em><span>Back</span></a>
                    <a href="{{ route('admin.users') }}" class="btn btn-icon btn-outline-light bg-white d-inline-flex d-sm-none"><em class="icon ni ni-arrow-left"></em></a>
                </div>
            </div>
        </div><!-- .nk-block-head -->
        <div class="nk-block">
            <div class="card card-bordered">
                <div class="card-aside-wrap">
                    <div class="card-content">
                        <ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card">
                            <li class="nav-item">
                                <a class="nav-link active" href="#"><em class="icon ni ni-user-circle"></em><span>Personal</span></a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#"><em class="icon ni ni-repeat"></em><span>Transactions</span></a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#"><em class="icon ni ni-file-text"></em><span>Documents</span></a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#"><em class="icon ni ni-bell"></em><span>Notifications</span></a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#"><em class="icon ni ni-activity"></em><span>Activities</span></a>
                            </li>
                            <li class="nav-item nav-item-trigger d-xxl-none">
                                <a href="#" class="toggle btn btn-icon btn-trigger" data-target="userAside"><em class="icon ni ni-user-list-fill"></em></a>
                            </li>
                        </ul><!-- .nav-tabs -->
                        <div class="card-inner">
                            <div class="nk-block">
                                <div class="nk-block-head">
                                    <h5 class="title">Personal Information</h5>
                                    <p>Basic info, like your name and address, that you use on {{ config('settings.site_name') }}.</p>
                                </div><!-- .nk-block-head -->
                                <div class="profile-ud-list">
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Full Name</span>
                                            <span class="profile-ud-value">{{ $user->lastname.' '.$user->middlename.' '.$user->firstname }}</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Date of Birth</span>
                                            <span class="profile-ud-value">{{ date_format(date_create($user->date_of_birth),'d M, Y') }}</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Username</span>
                                            <span class="profile-ud-value">{{ $user->username }}</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Mobile Number</span>
                                            <span class="profile-ud-value">{{ $user->phone_number }}</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Email Address</span>
                                            <span class="profile-ud-value">{{ $user->email }}</span>
                                        </div>
                                    </div>
                                </div><!-- .profile-ud-list -->
                            </div><!-- .nk-block -->
                            <div class="nk-block">
                                <div class="nk-block-head nk-block-head-line">
                                    <h6 class="title overline-title text-base">Additional Information</h6>
                                </div><!-- .nk-block-head -->
                                <div class="profile-ud-list">
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Joining Date</span>
                                            <span class="profile-ud-value">{{ date_format(date_create($user->created_at),'d-m-Y h:i A') }}</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Reg Method</span>
                                            <span class="profile-ud-value">Email</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">Country</span>
                                            <span class="profile-ud-value">{{ all_countries(strtolower($user->country)) }}</span>
                                        </div>
                                    </div>
                                    <div class="profile-ud-item">
                                        <div class="profile-ud wider">
                                            <span class="profile-ud-label">State</span>
                                            <span class="profile-ud-value">{{ $user->state }}</span>
                                        </div>
                                    </div>
                                </div><!-- .profile-ud-list -->
                            </div><!-- .nk-block -->
                            <div class="nk-divider divider md"></div>
                            <div class="nk-block">
                                <div class="bq-note">
                                    <div class="bq-note-item">
                                        <div class="bq-note-text">
                                            <div class="d-flex">
                                                <div class="mr-5">Max Transfer Count:</div>
                                                @if(!empty($user->account->max_transfer_count ))
                                                    <div class="mr-5">
                                                        {{ $user->account->max_transfer_count }}
                                                    </div>
                                                    <div class="mr-5"><a href="#" class="link link-sm">+ Update</a></div>
                                                @else
                                                    <div class="mr-5">
                                                        Globally set
                                                    </div>
                                                    <div class="mr-5"><a href="#" class="link link-sm">+ Set</a></div>
                                                @endif
                                            </div>
                                        </div>
                                    </div><!-- .bq-note-item -->
                                    <div class="bq-note-item">
                                        <div class="bq-note-text">
                                            <div class="d-flex">
                                                <div class="mr-5">Max Transfer Amount:</div>
                                                @if(!empty($user->account->max_transfer_amount))
                                                    <div class="mr-5">
                                                        {{ $user->account->account_currency.numbers($user->account->max_transfer_amount) }}
                                                    </div>
                                                        <div class="mr-5"><a href="#" class="link link-sm">+ Update</a></div>
                                                @else
                                                    <div class="mr-5">
                                                        Globally set
                                                    </div>
                                                    <div class="mr-5"><a href="#" class="link link-sm">+ Set</a></div>
                                                @endif
                                            </div>
                                        </div>
                                    </div><!-- .bq-note-item -->
                                </div><!-- .bq-note -->
                            </div><!-- .nk-block -->
                        </div><!-- .card-inner -->
                    </div><!-- .card-content -->
                    <div class="card-aside card-aside-right user-aside toggle-slide toggle-slide-right toggle-break-xxl" data-content="userAside" data-toggle-screen="xxl" data-toggle-overlay="true" data-toggle-body="true">
                        <div class="card-inner-group" data-simplebar>
                            <div class="card-inner">
                                <div class="user-card user-card-s2">
                                    <div class="user-avatar lg bg-primary">
                                        @if(!empty($user->profile_picture))
                                            <span><img alt="thumbnail" style="border-radius:40px;" height="70" src="/images/avatar/{{  $user->profile_picture }}"></span>
                                        @else
                                            <span><em class="icon ni ni-user"></em></span>
                                        @endif
                                    </div>
                                    <div class="user-info">
                                        <div class="badge badge-outline-light badge-pill ucap">{{ capWords($user->strength) }}</div>
                                        <h5>{{ $user->username }}</h5>
                                        <span class="sub-text">{{ $user->email }}</span>
                                    </div>
                                </div>
                            </div><!-- .card-inner -->
                            <div class="card-inner">
                                <div class="overline-title-alt mb-2">Account Summary</div>
                                <div class="profile-balance">
                                    <div class="profile-balance-group gx-4">
                                        <div class="profile-balance-sub">
                                            <div class="profile-balance-amount">
                                                <div class="number">{{ $user->account->account_currency.number_format($user->account->balance,2) }}</div>
                                            </div>
                                            <div class="profile-balance-subtitle">Balance</div>
                                        </div>
                                        <div class="profile-balance-sub">
                                            <span class="profile-balance-plus text-soft"><em class="icon ni ni-plus"></em></span>
                                            <div class="profile-balance-amount">
                                                <div class="number">{{ $user->account->account_currency.number_format($pending,2) }} </div>
                                            </div>
                                            <div class="profile-balance-subtitle">Pending</div>
                                        </div>
                                    </div>
                                </div>
                            </div><!-- .card-inner -->
                            <div class="card-inner">
                                <div class="row text-center">
                                    <div class="col-4">
                                        <div class="profile-stats">
                                            <span class="amount">{{ $allCount }}</span>
                                            <span class="sub-text">Transactions</span>
                                        </div>
                                    </div>
                                    <div class="col-4">
                                        <div class="profile-stats">
                                            <span class="amount">{{ $pendingCount }}</span>
                                            <span class="sub-text">Pending</span>
                                        </div>
                                    </div>
                                    <div class="col-4">
                                        <div class="profile-stats">
                                            <span class="amount">{{ $approvedCount }}</span>
                                            <span class="sub-text">Approved</span>
                                        </div>
                                    </div>
                                </div>
                            </div><!-- .card-inner -->
                        </div><!-- .card-inner -->
                    </div><!-- .card-aside -->
                </div><!-- .card-aside-wrap -->
            </div><!-- .card -->
        </div><!-- .nk-block -->
        @section('page-level-scripts')
        <script src="/js/admin/users.js?ver={{ rand(1,99999) }}"></script>
    @endsection
</x-admin.layout>
