<?php $__env->startSection('content'); ?>
<style>
  .invest{
    animation: glowing 1300ms infinite;
  }
    @keyframes  glowing {
        0% {
          border-color: #2d8019;
          box-shadow: 0 0 5px #2d8019;
        }
        50% {
          border-color: #49e819;
          box-shadow: 0 0 20px #49e819;
        }
        100% {
          border-color: #2d8019;
          box-shadow: 0 0 5px #2d8019;
        }
      }
</style>
      <!-- cards -->
      <div class="w-full px-6 py-6 mx-auto">
        <!-- row 1 -->
        <div class="flex flex-wrap -mx-3">


          <!-- card4 -->
          <div class="w-full max-w-full px-3 sm:w-1/2 sm:flex-none xl:w-full">
          <?php
          
           date_default_timezone_set('Africa/Lagos');
            /* This sets the $time variable to the current hour in the 24 hour clock format */
            $time = date("H");
            /* Set the $timezone variable to become the current timezone */
            $timezone = date("e");
            /* If the time is less than 1200 hours, show good morning */
            if ($time < "12") {
            ?>
        <div style="background-image:url('/assets/img/carousel-1.jpg');" class="bg-no-repeat bg-cover object-fill p-4 relative flex flex-col min-w-0 break-words bg-white shadow-xl rounded-2xl bg-clip-border">
            <?php } else 
            /* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */
            if ($time >= "12" && $time < "17") {
            ?>  
            <div style="background-image:url('/assets/img/carousel-2.jpg');" class="bg-no-repeat bg-cover object-fill p-4 relative flex flex-col min-w-0 break-words bg-white shadow-xl rounded-2xl bg-clip-border">
            <?php } else
            /* Should the time be between or equal to 1700 and 1900 hours, show good evening */
            if ($time >= "17" && $time < "19") { 
            ?>
            <div style="background-image:url('/assets/img/carousel-3.jpg');" class="bg-no-repeat bg-cover object-fill p-4 relative flex flex-col min-w-0 break-words bg-white shadow-xl rounded-2xl bg-clip-border">
            <?php } else
            /* Finally, show good night if the time is greater than or equal to 1900 hours */
            if ($time >= "19") { 
            ?>
            <div style="background-image:url('/assets/img/carousel-3.jpg');" class="bg-no-repeat bg-cover object-fill p-4 relative flex flex-col min-w-0 break-words bg-white shadow-xl rounded-2xl bg-clip-border">
            <?php }
            ?>

              <div class="flex-auto p-4">
                <div class="flex flex-row -mx-3">
                  <div class="flex-none w-2/3 max-w-full px-3">
                    <div>
                      <p class="mb-0 font-sans text-sm font-semibold leading-normal uppercase text-gray-200">Hey <?php echo e(Auth::user()->first_name); ?> 👋🏽</p>
                      <h5 class="mb-2 font-bold text-white">
                      <?php
                      
                      date_default_timezone_set('Africa/Lagos');
                        /* This sets the $time variable to the current hour in the 24 hour clock format */
                        $time = date("H");
                        /* Set the $timezone variable to become the current timezone */
                        $timezone = date("e");
                        /* If the time is less than 1200 hours, show good morning */
                        if ($time < "12") {
                            echo "Good morning";
                        } else
                        /* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */
                        if ($time >= "12" && $time < "17") {
                            echo "Good afternoon";
                        } else
                        /* Should the time be between or equal to 1700 and 1900 hours, show good evening */
                        if ($time >= "17" && $time < "20") {
                            echo "Good evening";
                        } else
                        /* Finally, show good night if the time is greater than or equal to 1900 hours */
                        if ($time >= "20") {
                            echo "Good night";
                        }
                        ?>
                      </h5>

                      <p class="mb-0 text-white">
                        Your Jango balance: 
                        <span class="font-bold text-white">&#8358;<?php echo number_format(Auth::user()->balance); ?></span>
                      </p>
                    </div>
                  </div>
                  <div class="px-3 text-right basis-1/3">
                    <div class="inline-block">
                     <a href="javascript:;">
                      <!-- <img class="h-20 w-20 max-w-full border-2 border-white border-solid rounded-circle" src="<?php echo e(asset('storage/images/'. Auth::user()->avatar)); ?>" alt="profile image"> -->
                      <?php if(Auth::user()->avatar == null): ?>
                      <img class="h-16 w-16 max-w-full border-2 border-white border-solid rounded-circle" 
                      style="object-fit:cover;" src="<?php echo e(asset('assets/img/download.png')); ?>" 
                      alt="profile image">
                      <?php else: ?>
                      <img class="h-16 w-16 max-w-full border-2 border-white border-solid rounded-circle" 
                      style="object-fit:cover;" src="<?php echo e(asset('storage/images/'. Auth::user()->avatar)); ?>" 
                      alt="profile image">
                      <?php endif; ?>
                    </a>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>

      


        <div class="flex flex-wrap -mx-3 mt-6">
          <div class="max-w-full px-3 lg:w-2/3 lg:flex-none">
            <div class="flex flex-wrap -mx-3">
              <div class="w-full max-w-full px-3 mb-6 xl:mb-0 xl:w-1/2 xl:flex-none">
                <div class="relative flex flex-col min-w-0 break-words bg-transparent border-0 border-transparent border-solid shadow-xl rounded-2xl bg-clip-border">
                  <div class="relative overflow-hidden rounded-2xl" style="background-image: url('https://raw.githubusercontent.com/creativetimofficial/public-assets/master/argon-dashboard-pro/assets/img/card-visa.jpg')">
                    <span class="absolute top-0 left-0 w-full h-full bg-center bg-cover bg-gradient-to-tl from-zinc-800 to-zinc-700 opacity-80"></span>
                    <div class="relative z-10 flex-auto p-4">
                      <i class="p-2 text-white fas fa-wifi"></i>
                      <h5 class="pb-2 mt-6 mb-12 text-white">Acct No: <?php echo e(Auth::user()->account_number); ?></h5>
                      <div class="flex">
                        <div class="flex">
                          <div class="mr-6">
                            <p class="mb-0 text-sm leading-normal text-white opacity-80">Account Name</p>
                            <h6 class="mb-0 text-white"><?php echo e(Auth::user()->account_name); ?></h6>
                          </div>
                          <div>
                            <p class="mb-0 text-sm leading-normal text-white opacity-80">Bank</p>
                            <h6 class="mb-0 text-white"><?php echo e(Auth::user()->bank_name); ?></h6>
                          </div>
                        </div>
                        <div class="flex items-end justify-end w-1/5 ml-auto">
                          <img class="w-3/5 mt-2" src="../assets/img/logos/mastercard.png" alt="logo" />
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="max-w-full px-3 mb-6 lg:mb-0 w-full lg:flex-none">
                <div class="relative flex flex-col min-w-0 mt-6 break-words bg-white border-0 border-transparent border-solid shadow-xl rounded-2xl bg-clip-border">
                  <div class="p-4 pb-0 mb-0 border-b-0 border-b-solid rounded-t-2xl border-b-transparent">
                    <div class="flex flex-wrap -mx-3">
                      <div class="flex items-center flex-none w-1/2 max-w-full px-3">
                        <h6 class="mb-0">Active Investment</h6>
                      </div>
                      <div class="flex-none w-1/2 max-w-full px-3 text-right">
                        <?php if($a_investment != null): ?>
                        <a class="inline-block px-5 py-2.5 font-bold leading-normal text-center text-white align-middle transition-all bg-transparent rounded-lg cursor-pointer text-sm ease-in shadow-md bg-150 bg-gradient-to-tl from-zinc-800 to-zinc-700 hover:shadow-xs active:opacity-85 hover:-translate-y-px tracking-tight-rem bg-x-25" 
                        href="<?php echo e(route('investments')); ?>"> 
                          <i class="ni ni-bold-up"> </i>&nbsp;&nbsp;Top Up Capital
                        </a>
                        <?php else: ?>
                        <a class="inline-block px-5 py-2.5 font-bold leading-normal text-center text-white align-middle transition-all bg-transparent rounded-lg cursor-pointer text-sm ease-in shadow-md bg-150 bg-gradient-to-tl from-zinc-800 to-zinc-700 hover:shadow-xs active:opacity-85 hover:-translate-y-px tracking-tight-rem bg-x-25" 
                        href="<?php echo e(route('investments')); ?>"> 
                          <i class="fas fa-plus"> </i>&nbsp;&nbsp;Start New Investment
                        </a>
                        <?php endif; ?>
                      </div>
                    </div>
                  </div>
                  <?php if($a_investment != null): ?>
                  <div class="flex-auto p-4">    
                  <div class="mb-4">
                      <small class="mb-0">Status: <span class="text-green-500">Ongoing...</span></small>
                      &nbsp;
                      <small class="mb-0">Plan: <span class="text-green-500"><?php echo e($a_investment->plan->name); ?></span></small>
                  </div>
                    <div class="flex flex-wrap -mx-3 mb-3">
                      <div class="max-w-full px-3 mb-6 md:mb-0 w-full md:flex-none">
                        <div class="relative text-center items-center flex-auto min-w-0 p-6 break-words bg-transparent border shadow-none md-max:overflow-auto rounded-xl border-green-500 bg-clip-border">
                          <h6 class="mb-0">You're Currently Investing</h6>
                          <h6 class="mb-0 text-xl"><b>&#8358;<?php echo e(number_format($a_investment->amount)); ?></b></h6> 
                          <h6 class="mb-0">To Get</h6>
                          <h6 class="text-slate-800 text-xl"><b>&#8358;<?php echo e(number_format(($a_investment->amount/100 * $a_investment->plan->percent_profit) * $a_investment->plan->period + $a_investment->amount)); ?></b></h6>
                          <a href="javascript:;" class="ml-auto pl-2 transition-all ease-nav-brand">
                             <p fixed-plugin-button class="cursor-pointer text-green-500 py-3 invest" style="border: 1px solid green;">View Investment</p>
                          </a>
                        </div>
                      </div>
                    </div>
                    
                    
                    <div class="flex flex-wrap -mx-3 mb-3">
                      <div class="max-w-full px-3 mb-6 md:mb-0 w-full md:flex-none">
                        <div class="relative flex flex-row items-center flex-auto min-w-0 p-6 break-words bg-transparent border shadow-none md-max:overflow-auto rounded-xl border-green-500 bg-clip-border">
                          <h6 class="mb-0 text-green-500 flex">
                                <?php if(auth()->user()->withdrawal_plan == 1): ?>
                                  Days Paid
                                <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
                                  Weeks Paid
                                <?php endif; ?>
                              <svg class="h-8 w-8 text-white"  fill="green" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 
                                2a9 9 0 11-18 0 9 9 0 0118 0z"/>
                              </svg>
                          </h6>
                          
                          <p href="javascript:;" class="ml-auto pl-2 mb-2">
                              <?php echo e(count($in_transactions)); ?>

                              
                                <?php if(auth()->user()->withdrawal_plan == 1): ?>
                                  Day(s)
                                <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
                                  Week(s)
                                <?php endif; ?>
                          </p>
                        </div>
                      </div>
                    </div>
                    
                    
                    <div class="flex flex-wrap -mx-3">
                      <div class="max-w-full px-3 mb-6 md:mb-0 w-full md:flex-none">
                        <div class="relative flex flex-row items-center flex-auto min-w-0 p-6 break-words bg-transparent border shadow-none md-max:overflow-auto rounded-xl border-green-500 bg-clip-border">
                          <h6 class="mb-0 text-gray-500 flex">
                                <?php if(auth()->user()->withdrawal_plan == 1): ?>
                                  Days Left
                                <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
                                  Weeks Left
                                <?php endif; ?>
                              <svg class="h-8 w-8 text-white"  fill="grey" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 
                                2a9 9 0 11-18 0 9 9 0 0118 0z"/>
                              </svg>
                          </h6>
                          
                          <p href="javascript:;" class="ml-auto pl-2 mb-2">
                              
                                <?php if(auth()->user()->withdrawal_plan == 1): ?>
                                 <?php echo e($a_investment->plan->period - count($in_transactions)); ?> Day(s)
                                <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
                                 <?php echo e($a_investment->plan->period/7 - count($in_transactions)); ?> Week(s)
                                <?php endif; ?>
                          </p>
                        </div>
                      </div>
                    </div>
                    

                    <div class="flex justify-center mt-4"> 
                      <div class="mr-4">  
                        <button type="button" class="text-center">
                            <i class="text-sm leading-normal text-white ni ni-time-alarm rounded-full px-2 py-1" style="background-color: #299954;"></i>
                        </button>
                        <?php echo e(date('M j Y', strtotime($a_investment->buy_date))); ?>

                      </div>
                      
                      <div>
                      <button type="button" class="text-center">
                            <i class="text-sm leading-normal text-white ni ni-time-alarm rounded-full px-2 py-1" style="background-color: #e74c38;"></i>
                        </button>
                        <?php echo e(date('M j Y', strtotime($a_investment->end_date))); ?>

                      </div>
                    </div>

                    <p class="text-sm text-center mt-4 text-gray-400">
                      Click on the eye icon to view Investment details.
                    </p>

                  </div>
                  <?php else: ?>
                  <p class="text-sm text-center p-6 mt-4 text-gray-400">
                      You currently have no ongoing plan, <br>
                      click on the "Start New Investment" button to buy one.
                  </p>
                  <?php endif; ?>
                  
                <button type="button" class="inline-block mx-auto mb-3 px-5 py-2.5 font-bold leading-normal text-center text-white align-middle transition-all rounded-lg cursor-pointer text-sm ease-in shadow-md bg-150 hover:shadow-xs active:opacity-85 hover:-translate-y-px tracking-tight-rem bg-x-25" 
                 id="withdraw" style="background-color: green;"> 
                  <i class="fa fa-money"> </i>&nbsp;&nbsp;Withdraw Balance
                </button>
                
                </div>
              </div>
            </div>
          </div>
          <div class="w-full max-w-full px-3 lg:w-1/3 lg:flex-none">
            <div class="relative flex flex-col h-full min-w-0 break-words bg-white border-0 border-transparent border-solid shadow-xl rounded-2xl bg-clip-border">
              <div class="p-4 pb-0 mb-0 border-b-0 border-b-solid rounded-t-2xl border-b-transparent">
                <div class="flex flex-wrap -mx-3">
                  <div class="flex items-center flex-none w-1/2 max-w-full px-3">
                    <h6 class="mb-0">Deposit History</h6>
                  </div>
                </div>
              </div>
              <div class="flex-auto p-4 pb-0">
                <ul class="flex flex-col pl-0 mb-0 rounded-lg">
                  
                <?php $__empty_1 = true; $__currentLoopData = $deposits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $deposit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                  <li class="relative flex justify-between px-4 py-2 pl-0 border-0 rounded-b-inherit rounded-xl text-inherit">
                    <div class="flex flex-col">
                      <h6 class="mb-1 text-sm font-semibold leading-normal text-slate-700"><?php echo date('D, M j, Y \a\t g:ia', strtotime($deposit->created_at)); ?></h6>
                      <span class="text-xs leading-tight">
                          <?php if($deposit->status == 1): ?>
                            <span style="color:green">Successfull</span>
                            <?php elseif($deposit->status == 2): ?>
                            <span style="color:red">Declined</span>
                            <?php elseif($deposit->status == null): ?>
                            <span style="color:orange">Pending</span>
                          <?php endif; ?>
                      </span>
                    </div>
                    <div class="flex items-center text-xs leading-normal">
                      &#8358;<?php echo e(number_format($deposit->amount)); ?>

                    </div>
                  </li>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                  <p class="text-sm text-center p-6 mt-4 text-gray-400">
                      You are yet to make a deposit. <br>
                      Do so, and your deposit history should appear here.
                  </p>
                  <?php endif; ?>

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



        <!-- cards row 3 -->

        <div class="flex flex-wrap mt-6 -mx-3">
        <div class="w-full max-w-full px-3 mt-6 md:w-7/12 md:flex-none mb-4">
            <div class="relative flex flex-col h-full min-w-0 mb-6 break-words bg-white border-0 shadow-xl rounded-2xl bg-clip-border">
              <div class="p-6 px-4 pb-0 mb-0 border-b-0 rounded-t-2xl">
                <div class="flex flex-wrap -mx-3">
                  <div class="max-w-full px-3 md:w-1/2 md:flex-none">
                    <h6 class="mb-0">Your Transactions</h6>
                  </div>
                  <div class="flex items-center justify-end max-w-full px-3 md:w-1/2 md:flex-none">
                    <i class="mr-2 far fa-calendar-alt"></i>
                    <small>
                    <?php 
                      date_default_timezone_set('Africa/Lagos');
                      echo 'Last Updated at ' . date('D, M j, Y \a\t g:ia');
                    ?></small>
                  </div>
                </div>
              </div>
              <div class="flex-auto p-4 pt-6">
                <h6 class="mb-4 text-sm font-bold leading-tight uppercase text-slate-500">Withdrawals</h6>
                <small class="mb-4 text-xs text-gray-400">My Current Balance Withdrawals</small>
                <ul class="flex flex-col pl-0 mb-0 rounded-lg">
                <?php $__empty_1 = true; $__currentLoopData = $withdrawals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $withdrawal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                  <li class="relative flex justify-between px-4 py-2 pl-0 mb-2 border-0 rounded-t-inherit text-inherit rounded-xl">
                      <div class="flex items-center">
                        <?php if($withdrawal->status == 2): ?>
                        <button class="leading-pro ease-in text-xs bg-150 w-6.5 h-6.5 p-1.2 rounded-3.5xl tracking-tight-rem bg-x-25 mr-4 mb-0 flex cursor-pointer items-center justify-center border border-solid border-emerald-500 border-transparent bg-transparent text-center align-middle font-bold uppercase text-emerald-500 transition-all hover:opacity-75"><i class="fas fa-arrow-up text-3xs"></i></button>
                        <?php elseif($withdrawal->status == 1): ?>
                        <button class="leading-pro ease-in text-xs bg-150 w-6.5 h-6.5 p-1.2 rounded-3.5xl tracking-tight-rem bg-x-25 mr-4 mb-0 flex cursor-pointer items-center justify-center border border-solid border-slate-700 border-transparent bg-transparent text-center align-middle font-bold uppercase text-slate-700 transition-all hover:opacity-75"><i class="fas fa-exclamation text-3xs"></i></button>
                        <?php elseif($withdrawal->status == 3): ?>             
                        <button class="leading-pro ease-in text-xs bg-150 w-6.5 h-6.5 p-1.2 rounded-3.5xl tracking-tight-rem bg-x-25 mr-4 mb-0 flex cursor-pointer items-center justify-center border border-solid border-red-600 border-transparent bg-transparent text-center align-middle font-bold uppercase text-red-600 transition-all hover:opacity-75"><i class="fas fa-arrow-down text-3xs"></i></button>
                        <?php endif; ?>
                      <div class="flex flex-col">
                        <h6 class="mb-1 text-sm leading-normal text-slate-700">
                            <?php if($withdrawal->status == 2): ?>
                              <span style="color:green">Approved</span>
                              <?php elseif($withdrawal->status == 1): ?>
                              <span style="color:yellow">Pending</span>
                              <?php elseif($withdrawal->status == 3): ?>
                              <span style="color:red">Declined</span>
                            <?php endif; ?>
                        </h6>
                        <span class="text-xs leading-tight"><?php echo date('D, M j, Y \a\t g:ia', strtotime($withdrawal->created_at)); ?></span>
                      </div>
                    </div>
                    <div class="flex flex-col items-center justify-center">
                      <p class="relative z-10 inline-block m-0 text-sm font-semibold leading-normal text-transparent bg-gradient-to-tl from-red-600 to-orange-600 bg-clip-text">- &#8358 <?php echo e(number_format($withdrawal->amount)); ?></p>
                    </div>
                  </li>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                  <p class="text-sm text-center p-6 mt-4 text-gray-400">
                      You haven't carried out any withdrawals yet
                  </p>
                  <?php endif; ?>
                </ul>
              </div>
            </div>
          </div>
          <div class="w-full max-w-full px-3 mt-0 lg:w-5/12 lg:flex-none">
            <div class="border-black/12.5 shadow-xl relative flex min-w-0 flex-col break-words rounded-2xl border-0 border-solid bg-white bg-clip-border">
              <div class="p-4 pb-0 rounded-t-4">
                <h6 class="mb-0">Orders</h6>
              </div>
              <div class="flex-auto p-4">
                <ul class="flex flex-col pl-0 mb-0 rounded-lg">
                <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                  <li class="relative flex justify-between py-2 pr-4 mb-2 border-0 rounded-t-lg rounded-xl text-inherit">
                    <div class="flex items-center">
                      <div class="inline-block w-8 h-8 mr-4 text-center bg-center fill-current stroke-none">                 
                      <?php if($order->status == 1): ?>
                        <button class="leading-pro ease-in text-xs bg-150 w-6.5 h-6.5 p-1.2 rounded-3.5xl tracking-tight-rem bg-x-25 mr-4 mb-0 flex cursor-pointer items-center justify-center border border-solid border-emerald-500 border-transparent bg-transparent text-center align-middle font-bold uppercase text-emerald-500 transition-all hover:opacity-75"><i class="fas fa-arrow-up text-3xs"></i></button>
                        <?php elseif($order->status == 2): ?>
                        <button class="leading-pro ease-in text-xs bg-150 w-6.5 h-6.5 p-1.2 rounded-3.5xl tracking-tight-rem bg-x-25 mr-4 mb-0 flex cursor-pointer items-center justify-center border border-solid border-slate-700 border-transparent bg-transparent text-center align-middle font-bold uppercase text-slate-700 transition-all hover:opacity-75"><i class="fas fa-exclamation text-3xs"></i></button>
                        <?php elseif($order->status == 3): ?>             
                        <button class="leading-pro ease-in text-xs bg-150 w-6.5 h-6.5 p-1.2 rounded-3.5xl tracking-tight-rem bg-x-25 mr-4 mb-0 flex cursor-pointer items-center justify-center border border-solid border-red-600 border-transparent bg-transparent text-center align-middle font-bold uppercase text-red-600 transition-all hover:opacity-75"><i class="fas fa-arrow-down text-3xs"></i></button>
                        <?php endif; ?>
                      </div>
                      <div class="flex flex-col">
                        <h6 class="mb-1 text-sm leading-normal text-slate-700">ID-<?php echo e($order->ref_id); ?></h6>
                        <span class="text-xs leading-tight"><?php echo date('D, M j, Y \a\t g:ia', strtotime($order->created_at)); ?></span>
                      </div>
                    </div>
                    <div class="flex">
                      <button class="group ease-in leading-pro text-xs rounded-3.5xl p-1.2 h-6.5 w-6.5 mx-0 my-auto inline-block cursor-pointer border-0 bg-transparent text-center align-middle font-bold text-slate-700 shadow-none transition-all"><i class="ni ease-bounce text-2xs group-hover:translate-x-1.25 ni-bold-right transition-all duration-200" aria-hidden="true"></i></button>
                    </div>
                  </li>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                  <p class="text-sm text-center p-6 mt-4 text-gray-400">
                      You haven't made any product orders yet
                  </p>
                  <?php endif; ?>
                </ul>
              </div>
            </div>
          </div>
        </div>
        
<script>
     $("#withdraw").click(function() {
        var balance = "<?php echo e(Auth::user()->balance); ?>";
        var investing = "<?php if($a_investment != null): ?> <?php echo 1; ?> <?php else: ?> <?php echo 2; ?> <?php endif; ?>";
        
        if(balance > 0){
            if(investing == 1){
                Swal.fire({
                      title: '',
                      text: 'Sorry, you can only withdraw your capital on the last day of your investment.', 
                      icon: 'error', 
                      confirmButtonText: 'Okay'
                    }).then(function() {
                        location.reload();
                    });
            }else{
                window.location.href = " <?php echo e(route('index.withdraw')); ?> ";
            }
        }else{
             Swal.fire({
                  title: '',
                  text: 'Sorry, you cannot make a withdrawal as you have no balance, Invest now to have a balance.', 
                  icon: 'error', 
                  confirmButtonText: 'Okay'
                }).then(function() {
                    window.location.href = " <?php echo e(route('investments')); ?> ";
                });
        }
     });
</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.user', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/jangodri/public_html/resources/views/home.blade.php ENDPATH**/ ?>