<?php $__env->startSection('title', $title); ?>
<?php $__env->startSection('content'); ?>
    <!-- Page title -->
    <div class="udex-main" id="main">
    <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.danger-alert','data' => []]); ?>
<?php $component->withName('danger-alert'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
    <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.success-alert','data' => []]); ?>
<?php $component->withName('success-alert'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <div class="mb-5 row">
                        <div class="p-2 text-center p-md-4 col-12">
                            <div class="table-responsive">
                                <div class="bg-white rounded mb-2 border">
                                    <h4 class="mb-0 p-3">Trading History</h4>
                                    <div class="table-responsive">
                                        <table class="table table-hover table-striped">
                                            
                                            <tr>
                                                <th style="min-width: 150px">Details</th><th style="min-width: 100px">Amount</th><th style="min-width: 150px">Status</th>
                                            </tr>
                                            <?php $__currentLoopData = $t_history; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $history): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php if($history->type=='LOSE'): ?>
                                            <tr>
                                                    <td>
                                                        <strong><span class="text-danger"><i class="fas fa-arrow-down mr-1"></i><?php echo e($history->plan); ?></span></strong><br />
                                                        <date class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></date>
                                                    </td>
                                                    <td class="text-danger"><?php echo e(Auth::user()->currency); ?> <?php echo e($history->amount); ?></td>
                                                    <td><span class="badge badge-pill badge-danger">Expired</span> <span class="small">LOSE - <?php echo e($history->leverage); ?>%</span>
                                                    <div class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></div></td>
                                                </tr>
                                                <?php elseif($history->type=='WIN'): ?>
                                                <tr>
                                                    <td>
                                                        <strong><span class="text-success"><i class="fas fa-arrow-up mr-1"></i><?php echo e($history->plan); ?></span></strong><br />
                                                        <date class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></date>
                                                    </td>
                                                    <td class="text-success"><?php echo e(Auth::user()->currency); ?> <?php echo e($history->amount); ?></td>
                                                    <td><span class="badge badge-pill badge-danger">Expired</span> <span class="small badge badge-pill badge-success">WIN +<?php echo e($history->leverage); ?>%</span>
                                                    <div class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></div></td>
                                                </tr>
                    
                                                <?php else: ?>
                                                <?php if($history->type=='Buy'): ?>
                                                <tr>
                                                    <td>
                                                        <strong><span class="text-success"><i class="fas fa-arrow-up mr-1"></i><?php echo e($history->plan); ?></span></strong><br />
                                                        <date class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></date>
                                                    </td>
                                                    <td><?php echo e(Auth::user()->currency); ?> <?php echo e($history->amount); ?></td>
                                                    <td><span class="badge badge-pill badge-success"> <?php echo e($history->type); ?> </span> <span class="small">Leverage: 1:<?php echo e($history->leverage); ?></span>
                                                    <div class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></div></td>
                                                </tr>
                                                <?php else: ?>
                                                <tr>
                                                    <td>
                                                        <strong><span class="text-danger"><i class="fas fa-arrow-down mr-1"></i><?php echo e($history->plan); ?></span></strong><br />
                                                        <date class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></date>
                                                    </td>
                                                    <td><?php echo e(Auth::user()->currency); ?> <?php echo e($history->amount); ?></td>
                                                    <td><span class="badge badge-pill badge-danger"> <?php echo e($history->type); ?> </span> <span class="small">Leverage: 1:<?php echo e($history->leverage); ?></span>
                                                    <div class="small text-black-50"><?php echo e($history->created_at->toDayDateTimeString()); ?></div></td>
                                                </tr>
                                                <?php endif; ?>
                                            <?php endif; ?>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </table>
                                    </div>
                                </div>
                               
                            </div>
                            <?php echo e($t_history->links()); ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dasht', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home1/tststrit/blaze.teststrintl.com/resources/views/user/thistory.blade.php ENDPATH**/ ?>