<?php $__env->startSection('title', '2FA Security Setup'); ?>
<?php $__env->startSection('content'); ?>
    <div class="max-w-2xl mx-auto bg-white dark:bg-[#0f172a] border border-slate-200 dark:border-[#1e293b] rounded-2xl p-8 shadow-sm">
        <h2 class="text-2xl font-bold text-slate-800 dark:text-white mb-2"><i class="fas fa-qrcode text-emerald-500 mr-2"></i> Two-Factor Authentication</h2>
        <p class="text-sm text-slate-500 mb-6">Protect your account with Google Authenticator.</p>

        <?php if(session('success')): ?>
            <div class="bg-emerald-50 text-emerald-600 p-4 rounded-xl mb-6 text-sm border border-emerald-100"><?php echo e(session('success')); ?></div>
        <?php endif; ?>
        <?php if(session('error')): ?>
            <div class="bg-red-50 text-red-600 p-4 rounded-xl mb-6 text-sm border border-red-100"><?php echo e(session('error')); ?></div>
        <?php endif; ?>

        <?php if(Auth::user()->two_factor_enabled): ?>
            <div class="bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/20 p-6 rounded-xl flex justify-between items-center mb-6">
                <div>
                    <span class="text-emerald-600 dark:text-emerald-400 font-bold block text-lg"><i class="fas fa-check-circle"></i> 2FA is ENABLED</span>
                    <p class="text-xs text-slate-500 mt-1">Your account is highly protected.</p>
                </div>
                <form action="<?php echo e(route('user.2fa.disable')); ?>" method="POST">
                    <?php echo csrf_field(); ?> 
                    <button class="bg-red-500 hover:bg-red-600 text-white px-5 py-2.5 rounded-lg text-sm font-bold transition-all">Disable 2FA</button>
                </form>
            </div>
        <?php else: ?>
            <div class="text-center mb-6 bg-slate-50 dark:bg-[#1e293b] p-6 rounded-xl border border-slate-200 dark:border-[#334155]">
                <p class="text-sm text-slate-600 dark:text-slate-300 mb-4">1. Scan this QR code with your Google Authenticator App.</p>
                <div class="inline-block p-3 bg-white rounded-xl mb-4 shadow-sm">
                    <?php echo $QR_Image; ?>

                </div>
                <p class="text-xs text-slate-500 font-mono mb-6 bg-slate-100 dark:bg-[#0f172a] py-2 px-4 rounded-lg inline-block">Secret Key: <?php echo e($secret); ?></p>

                <form action="<?php echo e(route('user.2fa.enable')); ?>" method="POST" class="max-w-xs mx-auto text-left">
                    <?php echo csrf_field(); ?>
                    <label class="block text-xs text-slate-500 mb-2 ml-1">Enter 6-digit Code:</label>
                    <input type="text" name="verify_code" placeholder="000000" class="w-full bg-white dark:bg-[#0f172a] border border-slate-300 dark:border-[#334155] text-slate-800 dark:text-white text-center text-xl tracking-[0.5em] rounded-lg p-3 mb-4 outline-none focus:border-emerald-500" required maxlength="6" autocomplete="off">
                    <button type="submit" class="w-full bg-emerald-500 hover:bg-emerald-600 text-white font-bold py-3 rounded-lg shadow-lg shadow-emerald-500/20 transition-all">Enable Security</button>
                </form>
            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('user.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/hhhnbari/public_html/resources/views/user/2fa-setup.blade.php ENDPATH**/ ?>