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


<link rel="stylesheet" href="<?php echo e(asset('static/tree/css/withdraw.css')); ?>">

    <body>
        <div class="withdraw-wrap">
            <div class="navbar">
                <span onclick="onBack()">
                    <i></i>
                </span>
                <span>recharge</span>
                <span>
                </span>
            </div>

            <div class="box">
                <div>
                    <p>available power</p>
                    <h3><?php echo e(number_format(auth()->user()->balance)); ?></h3>
                </div>
                <img src="<?php echo e(asset('static/tree/img/customerservice@2x.png')); ?>" alt="">
            </div>
            <div class="text" style="font-size: 0.26rem;">
                <p>All Tree Power investment plans can only purchase electricity. Please click on one of them.</p>
                <p class="p">Below packages buy power before you invest. </p>
            </div>

            <div>
                <form action="<?php echo e(route('user.deposit.insert')); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" name="deposit_method" value="1">
                    <div class="wrap2">
                        <h3>recharge amount</h3>

                        <ul class="list">
                            <?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li data-id="" class="item" class="item active amountItem" onclick="getAmount(this, <?php echo e($plan->min_amount); ?>)">
                                    <?php echo e($plan->min_amount); ?></li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            <li class="input-wrap">
                                <b>₦</b><input class="money" id="amount" type="text"
                                    placeholder="Enter the recharge amount" name="amount">
                            </li>
                             <li class="input-wrap" style="margin-top: 20px; display: none;">
                                <select name="type" style="width: 100%; height: 60px; border: none; background: transparent; font-size: 25px; padding-left: 30px;">
                                    <!--<option value="1">Channel 1</option>-->
                                    <option value="2" selected>Channel 2</option>
                                </select>
                             </li>
                        </ul>

                    </div>

                    <br>
                    <button style="display: block; width:100%; border: none; background:transparent;" type="submit">
                        <div class="btn"> Submit</div>
                    </button>
                </form>
            </div>

        </div>
    </body>
    <script src="<?php echo e(asset('static/plus/js/crypot-js.min.js?v=1')); ?>"></script>
    <script>
        $('.list .item').click(function() {
            $(this).addClass('active').siblings().removeClass('active');
            let value = $(this).text();
            $('.money').val(value.slice(1));
        })

        $('#money').keyup(function() {
            $(this)[0].value = $(this)[0].value.replace(/^(0+)|[^\d]+/g, '')
            $('.list .item').removeClass('active');
        })

        $('.upilist>li').click(function() {
            $(this).addClass('active').siblings().removeClass('active');
        })
    </script>
    <script>
        function getAmount(_this, amount) {
            var elements = document.querySelectorAll('.amountItem');
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].classList.contains('ui-active')) {
                    elements[i].classList.remove('ui-active')
                }
            }
            _this.classList.add('ui-active')
            document.querySelector('input[name="amount"]').value = amount;
        }
    </script>


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

<?php echo $__env->make('layouts.users', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/AMPPS/www/ipad/core/resources/views/templates/basic/user/payment/deposit.blade.php ENDPATH**/ ?>