

<?php $__env->startSection('content'); ?>
<!-- content @s -->
                <div class="nk-content nk-content-fluid">
                    <div class="container-xl wide-lg">
                        <div class="nk-content-body">
                            <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"><?php echo e($user->name); ?></strong></h3>
                                        <div class="nk-block-des text-soft">
                                            <ul class="list-inline">
                                                <li>User ID: <span class="text-base">UD00<?php echo e($user->id); ?></span></li>
                                                <li>Join Date: <span class="text-base"><?php echo e($user->created_at); ?></span></li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="nk-block-head-content">
                                        <a href="<?php echo e(url('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="<?php echo e(url('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="#" data-bs-toggle="modal" data-bs-target="#editUserProfile"><em class="icon ni ni-edit"></em><span>Edit User</span></a>
                                                </li>
                                                <li class="nav-item">
                                                    <a class="nav-link" href="#" data-bs-toggle="modal" data-bs-target="#sendUserMail"><em class="icon ni ni-emails-fill"></em><span>Send Mail to User</span></a>
                                                </li>
                                                
                                                <li class="nav-item">
    <a class="nav-link" href="<?php echo e(route('login.as.user', ['id' => $user->id])); ?>">
        <em class="icon ni ni-user-switch-fill"></em>
        <span>Login As User</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 of <?php echo e($user->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"><?php echo e($user->name); ?></span>
                                                            </div>
                                                        </div>
                                                        <div class="profile-ud-item">
                                                            <div class="profile-ud wider">
                                                                <span class="profile-ud-label">Join Date</span>
                                                                <span class="profile-ud-value"><?php echo e($user->created_at); ?></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"><?php echo e($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"><?php echo e($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"><?php echo e($user->created_at); ?></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"><?php echo e($user->country); ?></span>
                                                            </div>
                                                        </div>
                                                        <div class="profile-ud-item">
                                                            <div class="profile-ud wider">
                                                                <span class="profile-ud-label">Nationality</span>
                                                                <span class="profile-ud-value"><?php echo e($user->country); ?></span>
                                                            </div>
                                                        </div>
                                                    </div><!-- .profile-ud-list -->
                                                </div><!-- .nk-block -->
                                                <div class="nk-divider divider md"></div>
                                                
                                                <div class="nk-block">
                                                    <div class="nk-block-head nk-block-head-sm nk-block-between">
                                                        <h5 class="title">10 Recent Transactions</h5>
                                                        <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addTransaction" class="link link-sm">+ (Credit/Debit)</button>
                                                    </div><!-- .nk-block-head -->
                                                    
                
                                        
                                             <table class="table">
        <thead>
            <tr>
                <th>ID</th>
                <th>Coin</th>
                <th>Amount</th>
                <th>Status</th>
                <th>Date</th>
            </tr>
        </thead>
        <tbody>                                                      
                                  
             <?php $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transaction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($transaction->id); ?></td>
                    <td><?php echo e($transaction->amount); ?></td>
                    <td><?php echo e($transaction->type); ?></td>
                    <td><?php if($transaction->status == '1'): ?>
                                                            <span class="badge badge-dot bg-success">Successful</span>
                                                            <?php else: ?>
                                                            
                                                            <span class="badge badge-dot bg-warning">Pending</span>
                                                          <?php endif; ?></td>
                    <td><?php echo e($transaction->created_at); ?></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
         </tbody>
                                            </table>
                                         
                                
     <!-- Pagination links for transactions -->
                                                    
                                                </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">
                                                             <?php if($user->profile_pic): ?>
        <img src="<?php echo e(asset('storage/app/public/' . $user->profile_pic)); ?>" alt="<?php echo e($user->name); ?>" style="height: 84px;width: 84px;">
    <?php else: ?>
        <img src="<?php echo e(asset('storage/user_default.png')); ?>" alt="<?php echo e($user->name); ?>" style="height: 84px;width: 84px;">
    <?php endif; ?>
                                                        </div>
                                                        <div class="user-info">
                                                            <div class="badge bg-outline-light rounded-pill ucap">Investor</div>
                                                            <h5><?php echo e($user->name); ?></h5>
                                                            <span class="sub-text"><?php echo e($user->email); ?></span>
                                                        </div>
                                                    </div>
                                                </div><!-- .card-inner -->
                                                <div class="card-inner card-inner-sm">
                                                    <ul class="btn-toolbar justify-center gx-1">
                                                        <li><a href="#" class="btn btn-trigger btn-icon"><em class="icon ni ni-shield-off"></em></a></li>
                                                        <li><a href="#" class="btn btn-trigger btn-icon"><em class="icon ni ni-mail"></em></a></li>
                                                        <li><a href="#" class="btn btn-trigger btn-icon"><em class="icon ni ni-download-cloud"></em></a></li>
                                                        <li><a href="#" class="btn btn-trigger btn-icon"><em class="icon ni ni-bookmark"></em></a></li>
                                                        <li><a href="#" class="btn btn-trigger btn-icon text-danger"><em class="icon ni ni-na"></em></a></li>
                                                    </ul>
                                                </div><!-- .card-inner -->
                                                <div class="card-inner">
                                                    <div class="overline-title-alt mb-2">In Account</div>
                                                    <div class="profile-balance">
                                                        <center>
                                                        <div class="profile-balance-group gx-4">
                                                            <div class="profile-balance-sub">
                                                                <div class="profile-balance-amount">
                                                                    <div class="number"><?php echo e($totalCoinsBalance); ?> <small class="currency currency-usd"><?php echo e($currency); ?></small></div>
                                                                </div>
                                                                <div class="profile-balance-subtitle">Total Coins Balance</div>
                                                            </div>
                                                            
                                                        </div>
                                                        </center>
                                                    </div>
                                                </div><!-- .card-inner --
                                                <div class="card-inner">
                                                    <div class="row text-center">
                                                        <div class="col-4">
                                                            <div class="profile-stats">
                                                                <span class="amount">23</span>
                                                                <span class="sub-text">Total Order</span>
                                                            </div>
                                                        </div>
                                                        <div class="col-4">
                                                            <div class="profile-stats">
                                                                <span class="amount">20</span>
                                                                <span class="sub-text">Complete</span>
                                                            </div>
                                                        </div>
                                                        <div class="col-4">
                                                            <div class="profile-stats">
                                                                <span class="amount">3</span>
                                                                <span class="sub-text">Progress</span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div><!-- .card-inner -->
                                                <div class="card-inner">
                                                    <h6 class="overline-title-alt mb-2">5 Coins List</h6>
                                                    <div class="row g-3">
                                                        <div class="card card-bordered card-preview">
                                        <div class="card-inner">
                                            <table class="table" data-export-title="Export">
                                                <thead>
            <tr>
                <th>Icon</th>
                <th>Coin</th>
                <th>Total Balance</th>
            </tr>
        </thead>
        <tbody>
           <?php $__currentLoopData = $coinBalances; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $coinBalance): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><img src="<?php echo e($coinBalance->coin->icon); ?>" width="24px" height="24px"></td>
                    <td><?php echo e($coinBalance->coin->name); ?></td>
                    <td><?php echo e($coinBalance->balance); ?></td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
    </div>
                                    </div>
 

    
                                                    </div>
                                                </div><!-- .card-inner -->
                                                <div class="card-inner">
                                                    <h6 class="overline-title-alt mb-3">Groups</h6>
                                                    <ul class="g-1">
                                                        <li class="btn-group">
                                                            <a class="btn btn-xs btn-light btn-dim" href="#">investor</a>
                                                            <a class="btn btn-xs btn-icon btn-light btn-dim" href="#"><em class="icon ni ni-cross"></em></a>
                                                        </li>
                                                        <li class="btn-group">
                                                            <a class="btn btn-xs btn-light btn-dim" href="#">support</a>
                                                            <a class="btn btn-xs btn-icon btn-light btn-dim" href="#"><em class="icon ni ni-cross"></em></a>
                                                        </li>
                                                        <li class="btn-group">
                                                            <a class="btn btn-xs btn-light btn-dim" href="#">another tag</a>
                                                            <a class="btn btn-xs btn-icon btn-light btn-dim" href="#"><em class="icon ni ni-cross"></em></a>
                                                        </li>
                                                    </ul>
                                                </div><!-- .card-inner -->
                                            </div><!-- .card-inner -->
                                        </div><!-- .card-aside -->
                                    </div><!-- .card-aside-wrap -->
                                </div><!-- .card -->
                            </div><!-- .nk-block -->
                        </div>
                    </div>
                </div>
                <!-- content @e -->
                
                
                 <!-- Modal Transaction -->
    <div class="modal fade" id="addTransaction">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Add Transaction</h5>
                    <a href="#" class="close" data-bs-dismiss="modal" aria-label="Close">
                        <em class="icon ni ni-cross"></em>
                    </a>
                </div>
                <div class="modal-body">
                    <?php echo $__env->make('admin.addTransaction', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>
                <div class="modal-footer bg-light">
                    
                </div>
            </div>
        </div>
    </div> 
    
    
    
    
    <!-- Modal Edit User -->
    <div class="modal fade" id="editUserProfile">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Edit <?php echo e($user->name); ?> Profile</h5>
                    <a href="#" class="close" data-bs-dismiss="modal" aria-label="Close">
                        <em class="icon ni ni-cross"></em>
                    </a>
                </div>
                <div class="modal-body">
                    <?php echo $__env->make('admin.editUserProfile', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>
                <div class="modal-footer bg-light">
                    
                </div>
            </div>
        </div>
    </div> 
    
    
    <!-- Modal Send Mail -->
    <div class="modal fade" id="sendUserMail">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Send Mail to <?php echo e($user->name); ?></h5>
                    <a href="#" class="close" data-bs-dismiss="modal" aria-label="Close">
                        <em class="icon ni ni-cross"></em>
                    </a>
                </div>
                <div class="modal-body">
                    <?php echo $__env->make('admin.sendUserMail', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>
                <div class="modal-footer bg-light">
                    
                </div>
            </div>
        </div>
    </div> 
    
    
<?php $__env->stopSection(); ?>
<?php $__env->startPush('scripts'); ?>
    <script>
        <?php if(session('success')): ?>
            swal("Success", "<?php echo e(session('success')); ?>", "success");
        <?php elseif(session('error')): ?>
            swal("Error", "<?php echo e(session('error')); ?>", "error");
        <?php endif; ?>
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/qfsworl3/public_html/resources/views/admin/editUser.blade.php ENDPATH**/ ?>