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

 <div class="page-content">
    <div class="container">
    <div class="gaps-1x mgb-0-5x d-lg-none d-none d-sm-block"></div>


        <div class="card content-area">
            <div class="card-innr">
                <div class="card-head d-flex justify-content-between align-items-center">
                    <h4 class="card-title mb-0"><?php echo e($page_title); ?></h4>
                </div>
                                <div class="gaps-1x"></div>
                <div class="row guttar-vr-30px">

 <?php if(count($deal) > 0): ?>
 <?php $__currentLoopData = $deal; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>


                                        <div class="col-xl-4 col-md-6">
                        <div class="payment-card">
    <div class="payment-head">
        <div class="payment-logo">
            <img src="<?php echo e(asset('dash-assets/images/wall.png')); ?>" alt="Manual">
        </div>
        <div class="payment-action">
            <a href="javascript:void(0)" class="toggle-tigger rotate"><em class="ti ti-more-alt"></em></a>
            <div class="toggle-class dropdown-content dropdown-content-top-left">
                <ul class="dropdown-list">
                    <li><a href="#">View Transactions</a></li>
                    <?php if($data->status == 1): ?>
                    <li><a class="quick-action" href="<?php echo e(route('closemarket', $data->id)); ?>"" data-name="manual">Close Deal</a></li>
                    <?php endif; ?>
                     <?php if($data->status == 0): ?>
                    <li><a class="quick-action" href="<?php echo e(route('openmarket', $data->id)); ?>"" data-name="manual">Activate Deal</a></li>
                    <?php endif; ?>
                </ul>
            </div>
        </div>
    </div>
    <div class="payment-body">
       <a href="#">  <h5 class="payment-title"><?php echo e(App\Currency::whereId($data->coin)->first()->name); ?><br>
       Code: <?php echo e($data->code); ?></a>
        </h5>

        <p class="payment-text"><b>Created: <?php echo e(Carbon\Carbon::parse($data->created_at)->diffForHumans()); ?></b><br>
        Amount: $ <?php echo e(number_format($data->amount, $basic->decimal)); ?>

        .<br>
        Amount Sold: $ <?php echo e(number_format($data->sold, $basic->decimal)); ?>.
        </p>

               <?php if($data->status == 1): ?>
               <div class="payment-status payment-status-connected">
            <span class="payment-status-icon"><em class="ti ti-check"></em></span>
             <div class="payment-status-text">Deal Currently Active</div>
            <?php else: ?>
                <div class="payment-status payment-status-disabled">
            <span class="payment-status-icon"><em class="ti ti-na"></em></span>
             <div class="payment-status-text">Deal Currently Closed</div>
            <?php endif; ?>

        </div>
            </div>
    <div class="payment-footer">
                <span class="payment-id-title">Available Amount</span>
        <span class="payment-id">$ <?php echo e(number_format($data->balance, $basic->decimal)); ?></span>
            </div>
</div>
                    </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>


                                        <div class="col-xl-4 col-md-6">
                        <div class="payment-card">
    <div class="payment-head">
        <div class="payment-logo">
            <img src="<?php echo e(asset('dash-assets/images/wall.png')); ?>" alt="Manual">
        </div>

    </div>
    <div class="payment-body">
        <h5 class="payment-title">No Current Deal</h5>
        <p class="payment-text">You dont have any deal in the market at the moment.</p>
                <div class="payment-status payment-status-disabled">
            <span class="payment-status-icon"><em class="ti ti-na"></em></span>
            <div class="payment-status-text">Currently empty</div>
        </div>
            </div>
    <div class="payment-footer">
                <span class="payment-id-title">Empty</span>
        <span class="payment-id"> 0.00$ </span>
            </div>
</div>
                    </div>
<?php endif; ?>


                                    </div>
                <div class="gaps-0x"></div>
            </div>
        </div>
    </div>
</div>


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

<?php echo $__env->make('include.userdashboard', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>