<?php $__env->startSection('content'); ?>
    <div class="row justify-content-center gy-4">
        <?php if(!auth()->user()->ts): ?>
            <div class="col-md-6">
                <div class="card custom--card">
                    <div class="card-body">
                        <h5 class="card-title text-center"><?php echo app('translator')->get('Add Your Account'); ?></h5>
                        <p class="my-3 mb-3">
                            <?php echo app('translator')->get('Use the QR code or setup key on your Google Authenticator app to add your account. '); ?>
                        </p>

                        <div class="form-group mx-auto text-center">
                            <img class="mx-auto" src="<?php echo e($qrCodeUrl); ?>">
                        </div>

                        <div class="form-group">
                            <label class="form-label"><?php echo app('translator')->get('Setup Key'); ?></label>
                            <div class="input-group custom-input-group">
                                <input class="form-control form--control referralURL" name="key" type="text" value="<?php echo e($secret); ?>" readonly>
                                <button class="input-group-text copytext" id="copyBoard" type="button"> <i class="fa fa-copy"></i> </button>
                            </div>
                        </div>

                        <label class="form-label"><i class="fa fa-info-circle"></i> <?php echo app('translator')->get('Help'); ?></label>
                        <p><?php echo app('translator')->get('Google Authenticator is a multifactor app for mobile devices. It generates timed codes used during the 2-step verification process. To use Google Authenticator, install the Google Authenticator application on your mobile device.'); ?> <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('Download'); ?></a></p>
                    </div>
                </div>
            </div>
        <?php endif; ?>

        <div class="col-md-6">

            <?php if(auth()->user()->ts): ?>
                <div class="card custom--card">
                    <div class="card-body">
                        <h5 class="card-title text-center"><?php echo app('translator')->get('Disable 2FA Security'); ?></h5>
                        <form action="<?php echo e(route('user.twofactor.disable')); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <input name="key" type="hidden" value="<?php echo e($secret); ?>">
                            <div class="form-group">
                                <label class="form-label"><?php echo app('translator')->get('Google Authenticator OTP'); ?></label>
                                <input class="form--control" name="code" type="text" required>
                            </div>
                            <button class="btn btn--base w-100" type="submit"><?php echo app('translator')->get('Submit'); ?></button>
                        </form>
                    </div>
                </div>
            <?php else: ?>
                <div class="card custom--card">
                    <div class="card-body">
                        <h5 class="card-title text-center"><?php echo app('translator')->get('Enable 2FA Security'); ?></h5>
                        <form action="<?php echo e(route('user.twofactor.enable')); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <input name="key" type="hidden" value="<?php echo e($secret); ?>">
                            <div class="form-group">
                                <label class="form-label"><?php echo app('translator')->get('Google Authenticator OTP'); ?></label>
                                <input class="form--control" name="code" type="text" required>
                            </div>
                            <button class="btn btn--base w-100" type="submit"><?php echo app('translator')->get('Submit'); ?></button>
                        </form>
                    </div>
                </div>
            <?php endif; ?>
        </div>
    </div>
<?php $__env->stopSection(); ?>



<?php $__env->startPush('script'); ?>
    <script>
        (function($) {
            "use strict";
            $('#copyBoard').click(function() {
                var copyText = document.getElementsByClassName("referralURL");
                copyText = copyText[0];
                copyText.select();
                copyText.setSelectionRange(0, 99999);
                document.execCommand("copy");
                copyText.blur();
            });
        })(jQuery);
    </script>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('bottom-menu'); ?>
    <div class="col-12 order-lg-3 order-4">
        <div class="d-flex nav-buttons flex-align gap-md-3 gap-2">
            <a href="<?php echo e(route('user.profile.setting')); ?>" class="btn btn-outline--base"><?php echo app('translator')->get('Profile Setting'); ?></a>
            <a href="<?php echo e(route('user.change.password')); ?>" class="btn btn-outline--base"><?php echo app('translator')->get('Change Password'); ?></a>
            <a href="<?php echo e(route('user.twofactor')); ?>" class="btn btn--base active"><?php echo app('translator')->get('2FA Security'); ?></a>
        </div>
    </div>
<?php $__env->stopPush(); ?>


<?php $__env->startPush('style'); ?>
    <style>
        .form--control:disabled,
        .form--control[readonly] {
            background-color: hsl(var(--black) / 0.1);
        }
    </style>
<?php $__env->stopPush(); ?>

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