
<?php $__env->startSection('title'); ?>
    <?php echo app('translator')->get('User Dashboard'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('breadcrumb'); ?>
    <?php echo app('translator')->get('Dashboard'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="container-xl">
  <div class="row mb-3">
  
    <div class="col-sm-6 col-xl-3 mb-3">
      <div class="card card-sm">
        <div class="card-body">
          <div class="row align-items-center">
            <div class="col-auto">
              <span class="bg-danger text-white avatar">
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrows-right-left"  width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"  stroke-linecap="round" stroke-linejoin="round">
                  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                  <line x1="21" y1="7" x2="3" y2="7"></line>
                  <path d="M18 10l3 -3l-3 -3"></path>
                  <path d="M6 20l-3 -3l3 -3"></path>
                  <line x1="3" y1="17" x2="21" y2="17"></line>
               </svg>
              </span>
            </div>
            <div class="col">
              <div class="font-weight-medium">
                <?php echo e(numFormat($totalTransferMoney,2)); ?> <?php echo e($gs->curr_code); ?> <sup class="text-danger">*</sup>
              </div>
              <div class="text-muted">
                <?php echo app('translator')->get('Total Money Transfered'); ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="col-sm-6 col-xl-3 mb-3">
      <div class="card card-sm">
        <div class="card-body">
          <div class="row align-items-center">
            <div class="col-auto">
              <span class="bg-success text-white avatar">
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-currency-dogecoin" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
                  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                  <path d="M6 12h6"></path>
                  <path d="M9 6v12"></path>
                  <path d="M6 18h6a6 6 0 1 0 0 -12h-6"></path>
               </svg>
              </span>
            </div>
            <div class="col">
              <div class="font-weight-medium">
                <?php echo e(numFormat($totalDeposit,2)); ?> <?php echo e($gs->curr_code); ?> <sup class="text-danger">*</sup>
              </div>
              <div class="text-muted">
                <?php echo app('translator')->get('Total Deposit'); ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="col-sm-6 col-xl-3 mb-3">
      <div class="card card-sm">
        <div class="card-body">
          <div class="row align-items-center">
            <div class="col-auto">
              <span class="bg-warning text-white avatar">
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
                  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                  <rect x="8" y="8" width="12" height="12" rx="2"></rect>
                  <path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path>
               </svg>
              </span>
            </div>
            <div class="col">
              <div class="font-weight-medium">
                <?php echo e(numFormat($totalWithdraw,2)); ?> <?php echo e($gs->curr_code); ?> <sup class="text-danger">*</sup>
              </div>
              <div class="text-muted">
                <?php echo app('translator')->get('Total Withdraw'); ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="col-sm-6 col-xl-3 mb-3">
      <div class="card card-sm">
        <div class="card-body">
          <div class="row align-items-center">
            <div class="col-auto">
              <span class="bg-info text-white avatar">
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrows-right-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
                  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                  <line x1="21" y1="7" x2="3" y2="7"></line>
                  <path d="M18 10l3 -3l-3 -3"></path>
                  <path d="M6 20l-3 -3l3 -3"></path>
                  <line x1="3" y1="17" x2="21" y2="17"></line>
               </svg>
              </span>
            </div>
            <div class="col">
              <div class="font-weight-medium">
                <?php echo e(numFormat($totalExchange,2)); ?> <?php echo e($gs->curr_code); ?> <sup class="text-danger">*</sup>
              </div>
              <div class="text-muted">
                <?php echo app('translator')->get('Total Exchange'); ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
  
  <div class="row row-deck row-cards">
    <div class="col-lg-9">
        <div class="card">
          <div class="card-header">
            <h3 class="card-title"><?php echo app('translator')->get('Latest Transactions'); ?></h3>
          </div>
         
          <div class="table-responsive">
            <table class="table card-table table-vcenter text-nowrap datatable">
              <thead>
                <tr>
                  <th><?php echo app('translator')->get('Date'); ?></th>
                  <th><?php echo app('translator')->get('Description'); ?></th>
                  <th><?php echo app('translator')->get('Remark'); ?></th>
                  <th><?php echo app('translator')->get('Amount'); ?></th>
                  <th><?php echo app('translator')->get('Details'); ?></th>
                </tr>
              </thead>
              <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                  <tr>
                    <td data-label="<?php echo app('translator')->get('Date'); ?>"><?php echo e(dateFormat($item->created_at,'d-M-Y')); ?></td>
                    <td data-label="<?php echo app('translator')->get('Description'); ?>">
                      <?php echo e(__($item->details)); ?>

                    </td>
                    <td data-label="<?php echo app('translator')->get('Remark'); ?>">
                      <span class="badge badge-dark"><?php echo e(ucwords(str_replace('_',' ',$item->remark))); ?></span>
                    </td>
                    <td data-label="<?php echo app('translator')->get('Amount'); ?>">
                     <span class="<?php echo e($item->type == '+' ? 'text-success':'text-danger'); ?>"><?php echo e($item->type); ?> <?php echo e(amount($item->amount,$item->currency->type,2)); ?> <?php echo e($item->currency->code); ?></span> 
                    </td>
                    <td data-label="<?php echo app('translator')->get('Details'); ?>" class="text-end">
                        <button class="btn btn-primary btn-sm details" data-data="<?php echo e($item); ?>"><?php echo app('translator')->get('Details'); ?></button>
                    </td>
                  </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="12" class="text-center"><?php echo app('translator')->get('No data found'); ?></td></tr>
                <?php endif; ?>
              </tbody>
            </table>
          </div>
        </div>
    </div>
    <div class="col-lg-3">
      <div class="card wallet__card">
        <div class="card-header">
          <h4><?php echo app('translator')->get('Your Wallets'); ?></h4>
        </div>
        <div class="card-body card-body-scrollable card-body-scrollable-shadow">
          <div class="divide-y">
            <?php $__currentLoopData = $wallets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div>
              <div class="row align-items-center">
                <div class="col-auto">
                  <span class="bg-blue text-white avatar">
                    <?php echo e($item->currency->symbol); ?>

                  </span>
                </div>
                <div class="col">
                  <div class="<?php echo e($item->currency->default == 1 ? 'font-weight-bold text-success' : 'font-weight-medium'); ?>">
                    <?php echo e(amount($item->balance,$item->currency->type,2)); ?> <?php echo e($item->currency->code); ?>

                  </div>
                  <div class="text-muted">
                    <?php echo e($item->currency->curr_name); ?>

                  </div>
                </div>
              </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="modal modal-blur fade" id="modal-success" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-md modal-dialog-centered" role="document">
  <div class="modal-content">
      <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      <div class="modal-status bg-primary"></div>
      <div class="modal-body text-center py-4">
      <i  class="fas fa-info-circle fa-3x text-primary mb-2"></i>
      <h3><?php echo app('translator')->get('Transaction Details'); ?></h3>
      <p class="trx_details"></p>
      <ul class="list-group mt-2">
         
      </ul>
      </div>
      <div class="modal-footer">
      <div class="w-100">
          <div class="row">
          <div class="col"><a href="#" class="btn w-100" data-bs-dismiss="modal">
              <?php echo app('translator')->get('Close'); ?>
              </a></div>
          </div>
      </div>
      </div>
  </div>
  </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('script'); ?>
    <script>
      'use strict';
   
      $('.details').on('click',function () { 
        var url = "<?php echo e(url('user/transaction/details/')); ?>"+'/'+$(this).data('data').id
        $('.trx_details').text($(this).data('data').details)
        $.get(url,function (res) { 
          if(res == 'empty'){
            $('.list-group').html('<p><?php echo app('translator')->get('No details found!'); ?></p>')
          }else{
            $('.list-group').html(res)
          }
          $('#modal-success').modal('show')
        })
      })
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.user', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\update\wallet2_2\project\resources\views/user/dashboard.blade.php ENDPATH**/ ?>