

<?php $__env->startSection('content'); ?>

<div class="w-full px-5 py-6 mx-auto mb-12">      

        <!-- card 2 -->

        <div class="w-full bg-slate-850 rounded-lg px-3 mt-0 lg:flex-none">
        <div class="px-6 pt-4 pb-0 mb-0 border-b-0 rounded-t-2xl">
          <div class="float-left">
            <h5 class="mt-4 mb-0 text-white">My Investment</h5>
            <p class="mb-4">Your Selected Investment Details.</p>
          
          <!-- End Toggle Button -->
        
        <hr class="h-px mx-0 my-1 bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent" />
        <div class="flex-auto p-6 pt-0 overflow-auto sm:pt-4">
          <!-- Sidebar Backgrounds -->
          <div>
            <h6 class="text-white opacity-80 flex"><span>Start Date &RightArrow; <?php echo e(date('M j Y', strtotime($investment->buy_date))); ?></span><span class="py-2.2 text-xs rounded-circle h-5.6 mr-1.25 w-5.6 ease-in-out bg-gradient-to-tl from-emerald-500 to-teal-400 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700 ml-2"></span></h6>
            <h6 class="text-white opacity-80 flex"><span>End Date &nbsp; &RightArrow; <?php echo e(date('M j Y', strtotime($investment->end_date))); ?></span><span class="py-2.2 text-xs rounded-circle h-5.6 mr-1.25 w-5.6 ease-in-out bg-gradient-to-tl from-red-600 to-orange-600 relative inline-block cursor-pointer whitespace-nowrap border border-solid border-white text-center align-baseline font-bold uppercase leading-none text-white transition-all duration-200 hover:border-slate-700 ml-2"></span></h6>
            <h6 class="text-white opacity-80 flex">
                <span>Status &nbsp; &nbsp; &nbsp;&nbsp; &RightArrow; 
                <?php if($investment->status == 2): ?>
                <span class="font-semibold" style="color:green">Ongoing</span>
                <?php elseif($investment->status == 4): ?>
                <span class="font-semibold" style="color:red">Declined</span>
                <?php elseif($investment->status == 3): ?>
                <span class="font-semibold" style="color:blue">Completed</span>
                <?php elseif($investment->status == 1): ?>
                <span class="font-semibold" style="color:orange">Pending</span>
                <?php endif; ?>
                </span>
            </h6>
          </div>
          
          <!-- Sidenav Type -->
          <div class="mt-4">
            <p class="text-sm leading-normal">All the returns on investment displayed below will 
              be credited into your added withdrawal account.
              <?php if(auth()->user()->withdrawal_plan == 1): ?>
              Daily
              <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
              Weekly
              <?php endif; ?>
              as it drops. This Investment will span for <?php echo e($investment->plan->period); ?> days.
            </p>
          </div>
          <div class="mt-2">
            <?php if($in_transactions): ?>
            <?php $__empty_1 = true; $__currentLoopData = $in_transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
               <div class="border-2 border-white p-2 my-4" style="border-radius:20px">
                   <span class="text-white">
                       + &#8358;<?php echo e($investment->amount/100 * $investment->plan->percent_profit); ?> <br>
                       <small class="text-gray-400"> 
                        <?php if(auth()->user()->withdrawal_plan == 1): ?>
                          Day <?php echo e($index + 1); ?> Paid
                          <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
                          Week <?php echo e($index + 1); ?> Paid
                        <?php endif; ?>
                       </small>
                   </span>
                   <span class="float-right">
                      <svg class="h-12 w-12 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>
                   </span>
               </div>
               <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <?php endif; ?>
             <?php if($investment->status == 2): ?>
                <div class="border-2 border-white px-2 py-4 my-4" style="border-radius:20px">
                   <span class="text-white loading">
                       <?php if(count($in_transactions) == $investment->plan->period): ?>
                          Rounding Up Investment.......
                        <?php else: ?>
                        <?php if(auth()->user()->withdrawal_plan == 1): ?>
                          Day <?php echo e(count($in_transactions) + 1); ?> in Progress.......
                        <?php elseif(auth()->user()->withdrawal_plan == 2): ?>
                          Week <?php echo e(count($in_transactions) + 1); ?>  in Progress.......
                          <?php endif; ?>
                        
                        <?php endif; ?>
                      <br>
                   </span>
                   <span class="float-right">
                      <svg class="h-12 w-12 text-white mt-4"  fill="gray" 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>
                   </span>
               </div>
              <?php endif; ?>
            <?php else: ?>
            <?php endif; ?>
          </div>
          <p class="block mt-2 text-sm leading-normal xl:hidden">We keep your investment process private and accurate</p>
        
          <?php if($investment->status == 1): ?>
          <?php else: ?>
          <a href="<?php echo e(route('investments')); ?>" class="inline-block w-full px-6 py-2.5 mb-4 font-bold leading-normal text-center text-white align-middle transition-all bg-transparent border border-solid border-transparent rounded-lg cursor-pointer text-sm ease-in hover:shadow-xs hover:-translate-y-px active:opacity-85 tracking-tight-rem shadow-md bg-150 bg-x-25 bg-gradient-to-tl from-zinc-800 to-zinc-700" href="https://www.creative-tim.com/product/argon-dashboard-tailwind"> 
            <?php if($investment->status == 2): ?> Top Up Capital <?php else: ?> Start New Investment <?php endif; ?>
          </a>
          <?php endif; ?>
        
        </div>

  </div>

<?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/investment_details.blade.php ENDPATH**/ ?>