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

    <!-- ========User-Panel-Section Starte Here ========-->
    <div class="row">
        <div class="col-12">
            <h2 class="content-header"><?php echo e(__($page_title)); ?></h2>
        </div>
    </div>

    <section class="user-panel-section padding-bottom padding-top">
        <div class="container user-panel-container">
            <div class=" user-panel-tab">
                <div class="row">

                    <div class="col-lg-12" >

                        <div class="tab-area fullscreen-width">
                            <div class="tab-item active">
                                <div class="row mb-60-80">
                                    <div class="col-md-12">
                                        <?php if($errors->any()): ?>
                                            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div><?php echo e($error); ?></div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </div>


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

                                        <div class="col-lg-3 col-md-3 mb-4">
                                            <div class="card card-deposit">
                                                <h5 class="card-header card-header-bg text-center"><?php echo e(__($data->name)); ?></h5>
                                                <div class="card-body card-body-deposit card-body-p">
                                                    <img src="<?php echo e($data->methodImage()); ?>" class="card-img-top" alt="<?php echo e($data->name); ?>" style="width: 100%">
                                                </div>
                                                <div class="card-footer card-footer-bg">
                                                    <button type="button"  data-id="<?php echo e($data->id); ?>" data-resource="<?php echo e($data); ?>"
                                                       data-min_amount="<?php echo e(formatter_money($data->min_amount, $data->method->crypto())); ?>"
                                                       data-max_amount="<?php echo e(formatter_money($data->max_amount, $data->method->crypto())); ?>"
                                                       data-base_symbol="<?php echo e($data->baseSymbol()); ?>"
                                                       data-fix_charge="<?php echo e(formatter_money($data->fixed_charge, $data->method->crypto())); ?>"
                                                       data-percent_charge="<?php echo e(formatter_money($data->percent_charge, $data->method->crypto())); ?>"
                                                       class=" btn btn-custom2 btn-block  deposit" data-toggle="modal" data-target="#exampleModal">
                                                        <?php echo app('translator')->get('Deposit Now'); ?></button>
                                                </div>
                                            </div>
                                        </div>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- ========User-Panel-Section Ends Here ========-->
<?php $__env->stopSection(); ?>

<?php $__env->startPush('renderModal'); ?>
    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <strong class="modal-title method-name text-bold-600" id="exampleModalLabel"></strong>
                    <a href="javascript:void(0)" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </a>
                </div>
                <form action="<?php echo e(route('user.deposit.insert')); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <p class="text-danger depositLimit"></p>
                        <p class="text-danger depositCharge"></p>
                        <div class="form-group">
                            <input type="hidden" name="currency" class="edit-currency" value="">
                            <input type="hidden" name="method_code" class="edit-method-code" value="">
                        </div>
                        <div class="form-group">
                            <label><?php echo app('translator')->get('Enter Amount'); ?>:</label>
                            <div class="input-group">
                                <input id="amount" type="text" class="form-control form-control-lg" onkeyup="this.value = this.value.replace (/^\.|[^\d\.]/g, '')" name="amount" placeholder="0.00" required=""  value="<?php echo e(old('amount')); ?>">
                                <div class="input-group-prepend">
                                    <span class="input-group-text currency-addon addon-bg"><?php echo e($general->cur_text); ?></span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary btn-block"><?php echo app('translator')->get('Confirm'); ?></button>
                        <button type="button" class="btn btn-secondary btn-block" data-dismiss="modal"><?php echo app('translator')->get('Close'); ?></button>
                    </div>
                </form>
            </div>
        </div>
    </div>
<?php $__env->stopPush(); ?>


<?php $__env->startSection('load-js'); ?>
<?php $__env->stopSection(); ?>


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

        $(document).ready(function(){

            $('.deposit').on('click', function () {
                var id = $(this).data('id');
                var result = $(this).data('resource');
                var minAmount = $(this).data('min_amount');
                var maxAmount = $(this).data('max_amount');
                var baseSymbol = "<?php echo e($general->cur_text); ?>";
                // var baseSymbol = $(this).data('base_symbol');
                var fixCharge = $(this).data('fix_charge');
                var percentCharge = $(this).data('percent_charge');

                var depositLimit = `<?php echo app('translator')->get('Deposit Limit:'); ?> ${minAmount} - ${maxAmount}  ${baseSymbol}`;
                $('.depositLimit').text(depositLimit);
                var depositCharge = `<?php echo app('translator')->get('Charge:'); ?> ${fixCharge} ${baseSymbol} + ${percentCharge} %`
                $('.depositCharge').text(depositCharge);
                $('.method-name').text(`<?php echo app('translator')->get('Payment By '); ?> ${result.name}`);
                // $('.currency-addon').text(`${result.currency}`);
                $('.currency-addon').text(baseSymbol);


                $('.edit-currency').val(result.currency);
                $('.edit-method-code').val(result.method_code);

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

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