<?php $__env->startSection('content'); ?>
    <div class="container">
        <div class="row justify-content-center">
            <?php if(Auth::user()->ts): ?>
            <div class="col-md-6">
                <div class="card border border--base">
                    <div class="card-header bg--base">
                        <h5 class="card-title m-0 p-2 text-white"><?php echo app('translator')->get('Google Authenticator'); ?></h5>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                        <h6><?php echo app('translator')->get('Your 2FA Verification is Enabled.'); ?></h6>
                        </div>
                        <div class="form-group">

                            <button type="button" class="btn w-100 btn--danger" data-bs-toggle="modal" data-bs-target="#disableModal"><?php echo app('translator')->get('Disable 2FA Authenticator'); ?></button>
                        </div>
                    </div>
                </div>
            </div>
            <?php else: ?>
            <div class="col-md-8">
                <div class="card border border--base">
                    <div class="card-header bg--base">
                        <h5 class="card-title m-0 p-2 text-white"><?php echo app('translator')->get('Google Authenticator'); ?></h5>
                    </div>
                    <div class="card-body">
                        <div class="form-group mx-auto text-center">
                            <img class="mx-auto" src="<?php echo e($qrCodeUrl); ?>">
                            <p class="fs--14px mt-2"><?php echo app('translator')->get('Use Google Authentication App to scan the QR code.'); ?> <a class="text--base" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en" target="_blank"><?php echo app('translator')->get('App Link'); ?></a></p>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <input type="text" name="key" value="<?php echo e($secret); ?>" class="form--control form-control-lg" id="referralURL" readonly>
                                <button class="input-group-text border--base bg--base text-white copytext" id="copyBoard" onclick="myFunction()"> <i class="fa fa-copy"></i> </button>
                            </div>
                        </div>

                        <div class="form-group mx-auto text-center">
                            <button type="button" class="btn custom--bg text-white w-100" data-bs-toggle="modal" data-bs-target="#enableModal">
                                <?php echo app('translator')->get('Enable 2FA Authenticator'); ?>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <?php endif; ?>
        </div>
    </div>

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

<?php $__env->startPush('modal'); ?>
    <!--Enable Modal -->
    <div class="modal fade" id="enableModal" tabindex="-1" aria-labelledby="enableModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content ">
                <div class="modal-header">
                    <h4 class="modal-title"><?php echo app('translator')->get('Verify Your OTP'); ?></h4>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form action="<?php echo e(route('user.twofactor.enable')); ?>" method="POST">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body ">
                        <div class="form-group">
                            <input type="hidden" name="key" value="<?php echo e($secret); ?>">
                            <input type="text" class="form--control" name="code" placeholder="<?php echo app('translator')->get('Enter Google Authenticator Code'); ?>">
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-md btn-danger" data-bs-dismiss="modal"><?php echo app('translator')->get('Cancel'); ?></button>
                        <button type="submit" class="btn btn-md text-white custom--bg"><?php echo app('translator')->get('Verify'); ?></button>
                    </div>
                </form>
            </div>

        </div>
    </div>

    <!--Disable Modal -->
    <div class="modal fade" id="disableModal" tabindex="-1" aria-labelledby="disableModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"><?php echo app('translator')->get('Verify Your OTP'); ?></h4>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form action="<?php echo e(route('user.twofactor.disable')); ?>" method="POST">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <div class="form-group">
                            <input type="text" class="form--control" name="code" placeholder="<?php echo app('translator')->get('Enter Google Authenticator Code'); ?>">
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-md btn-danger" data-bs-dismiss="modal"><?php echo app('translator')->get('Cancel'); ?></button>
                        <button type="submit" class="btn btn-md text-white custom--bg"><?php echo app('translator')->get('Verify'); ?></button>
                    </div>
                </form>
            </div>
        </div>
    </div>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('script'); ?>
    <script>
        "use strict";
        function myFunction() {
            var copyText = document.getElementById("referralURL");
            copyText.select();
            copyText.setSelectionRange(0, 99999);
            /*For mobile devices*/
            document.execCommand("copy");
            iziToast.success({message: "Copied: " + copyText.value, position: "topRight"});
        }
    </script>
<?php $__env->stopPush(); ?>


<?php $__env->startPush('bottom-menu'); ?>
    <li><a href="<?php echo e(route('user.profile.setting')); ?>"><?php echo app('translator')->get('Profile'); ?></a></li>
    <?php if($general->modules->referral_system): ?>
        <li><a href="<?php echo e(route('user.referral.users')); ?>"><?php echo app('translator')->get('Referral'); ?></a></li>
    <?php endif; ?>
    <li><a class="active" href="<?php echo e(route('user.twofactor')); ?>"><?php echo app('translator')->get('2FA Security'); ?></a></li>
    <li><a href="<?php echo e(route('user.change.password')); ?>"><?php echo app('translator')->get('Change Password'); ?></a></li>
    <li><a href="<?php echo e(route('user.transaction.history')); ?>"><?php echo app('translator')->get('Transactions'); ?></a></li>
    <li><a class="<?php echo e(menuActive(['ticket.*'])); ?>" href="<?php echo e(route('ticket')); ?>"><?php echo app('translator')->get('Support Tickets'); ?></a></li>
<?php $__env->stopPush(); ?>

<?php echo $__env->make($activeTemplate.'layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/aartham/public_html/neobanking.aartham.com/core/resources/views/templates/basic/user/twofactor.blade.php ENDPATH**/ ?>