<?php $__env->startSection('section', admin_trans('Account')); ?>
<?php $__env->startSection('title', admin_trans('Account Settings')); ?>
<?php $__env->startSection('container', 'container-max-lg'); ?>
<?php $__env->startSection('content'); ?>
    <div class="details mb-4">
        <form action="<?php echo e(route('admin.account.details')); ?>" method="POST" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>
            <div class="card">
                <div class="card-header">
                    <span><?php echo e(admin_trans('Personal details')); ?></span>
                </div>
                <div class="card-body">
                    <div class="row align-items-center mb-3">
                        <div class="col-auto">
                            <img id="filePreview" src="<?php echo e(asset($admin->avatar)); ?>" alt="<?php echo e($admin->name); ?>"
                                class="rounded-circle border" width="80px" height="80px">
                        </div>
                        <div class="col-auto">
                            <button id="selectFileBtn" type="button" class="btn btn-secondary btn-sm"><i
                                    class="fas fa-camera me-2"></i><?php echo e(admin_trans('Choose Image')); ?></button>
                            <input id="selectedFileInput" type="file" name="avatar"
                                accept="image/png, image/jpg, image/jpeg" hidden>
                        </div>
                    </div>
                    <div class="row g-3 mb-3">
                        <div class="col-lg-6">
                            <label class="form-label"><?php echo e(admin_trans('First Name')); ?></label>
                            <input type="firstname" class="form-control" name="firstname" value="<?php echo e($admin->firstname); ?>"
                                required>
                        </div>
                        <div class="col-lg-6">
                            <label class="form-label"><?php echo e(admin_trans('Last Name')); ?></label>
                            <input type="lastname" class="form-control" name="lastname" value="<?php echo e($admin->lastname); ?>"
                                required>
                        </div>
                    </div>
                    <div class="mb-3">
                        <label class="form-label"><?php echo e(admin_trans('Email Address')); ?></label>
                        <input type="email" class="form-control" name="email" value="<?php echo e($admin->email); ?>" required>
                    </div>
                    <button class="btn btn-primary"><?php echo e(admin_trans('Save Changes')); ?></button>
                </div>
            </div>
        </form>
    </div>
    <div class="password mb-4">
        <form id="vironeer-submited-form" action="<?php echo e(route('admin.account.password')); ?>" method="POST">
            <?php echo csrf_field(); ?>
            <div class="card">
                <div class="card-header">
                    <span><?php echo e(admin_trans('Password')); ?></span>
                </div>
                <div class="card-body">
                    <div class="mb-3">
                        <label class="form-label"><?php echo e(admin_trans('Password')); ?></label>
                        <input type="password" class="form-control" name="current-password" required>
                    </div>
                    <div class="mb-3">
                        <label class="form-label"><?php echo e(admin_trans('New Password')); ?></label>
                        <input type="password" class="form-control" name="new-password" required>
                    </div>
                    <div class="mb-3">
                        <label class="form-label"><?php echo e(admin_trans('Confirm New Password')); ?></label>
                        <input type="password" class="form-control" name="new-password_confirmation" required>
                    </div>
                    <button class="btn btn-primary"><?php echo e(admin_trans('Save Changes')); ?></button>
                </div>
            </div>
        </form>
    </div>
    <div class="2fa">
        <div class="card">
            <div class="card-header d-flex justify-content-between align-items-center">
                <span><?php echo e(admin_trans('2Factor Authentication')); ?></span>
                <?php if(!$admin->google2fa_status): ?>
                    <span class="badge bg-danger"><?php echo e(admin_trans('Disabled')); ?></span>
                <?php else: ?>
                    <span class="badge bg-success"><?php echo e(admin_trans('Enabled')); ?></span>
                <?php endif; ?>
            </div>
            <div class="card-body">
                <p><?php echo e(admin_trans('Two-factor authentication (2FA) strengthens access security by requiring two methods (also referred to as factors) to verify your identity. Two-factor authentication protects against phishing, social engineering, and password brute force attacks and secures your logins from attackers exploiting weak or stolen credentials.')); ?>

                </p>
                <?php if(!$admin->google2fa_status): ?>
                    <div class="row g-3 mb-3">
                        <div class="col-lg-6">
                            <div class="border h-100 text-center p-4">
                                <div class="mb-2">
                                    <?php echo $QR_Image; ?>

                                </div>
                                <div class="input-group mb-3">
                                    <input id="input-link" type="text" class="form-control form-control-md"
                                        value="<?php echo e($admin->google2fa_secret); ?>" readonly>
                                    <button id="copy-btn" class="btn btn-secondary" data-clipboard-target="#input-link"><i
                                            class="far fa-clone"></i></button>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="border h-100 p-4">
                                <form action="<?php echo e(route('admin.account.2fa.enable')); ?>" method="POST">
                                    <?php echo csrf_field(); ?>
                                    <div class="mb-3">
                                        <label class="form-label"><?php echo e(admin_trans('OTP Code')); ?></label>
                                        <input type="text" name="otp_code" class="form-control input-numeric"
                                            placeholder="• • • • • •" maxlength="6" required>
                                    </div>
                                    <button class="btn btn-success w-100"><?php echo e(admin_trans('Enable')); ?></button>
                                </form>
                            </div>
                        </div>
                    </div>
                <?php else: ?>
                    <div class="mb-3">
                        <div class="col-lg-6 m-auto">
                            <div class="border h-100 p-4">
                                <form action="<?php echo e(route('admin.account.2fa.disable')); ?>" method="POST">
                                    <?php echo csrf_field(); ?>
                                    <div class="mb-3">
                                        <label class="form-label"><?php echo e(admin_trans('OTP Code')); ?></label>
                                        <input type="text" name="otp_code" class="form-control input-numeric"
                                            placeholder="• • • • • •" maxlength="6" required>
                                    </div>
                                    <button class="btn btn-danger w-100"><?php echo e(admin_trans('Disable')); ?></button>
                                </form>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>
                <p class="mb-2">
                    <?php echo e(admin_trans('To use the two factor authentication, you have to install a Google Authenticator compatible app. Here are some that are currently available:')); ?>

                </p>
                <li class="mb-1"><a target="_blank"
                        href="https://apps.apple.com/us/app/google-authenticator/id388497605"><?php echo e(admin_trans('Google Authenticator for iOS')); ?></a>
                </li>
                <li class="mb-1"><a target="_blank"
                        href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en&gl=US"><?php echo e(admin_trans('Google Authenticator for Android')); ?></a>
                </li>
                <li class="mb-1"><a target="_blank"
                        href="https://apps.apple.com/us/app/microsoft-authenticator/id983156458"><?php echo e(admin_trans('Microsoft Authenticator for iOS')); ?></a>
                </li>
                <li class="mb-1"><a target="_blank"
                        href="https://play.google.com/store/apps/details?id=com.azure.authenticator&hl=en_US&gl=US"><?php echo e(admin_trans('Microsoft Authenticator for Android')); ?></a>
                </li>
            </div>
        </div>
    </div>
    <?php $__env->startPush('scripts_libs'); ?>
        <script src="<?php echo e(asset('vendor/libs/clipboard/clipboard.min.js')); ?>"></script>
    <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.grid', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/neofiles.codenine.biz.id/resources/views/backend/account.blade.php ENDPATH**/ ?>