<?php $__env->startSection('content'); ?>
    <section class="p-top-90 p-bottom-90 bg-gray-gradient" data-aos="fade">

        <div class="container">
            <div class="row justify-content-center">
                <div class="col-12 col-xl-5 col-lg-8 col-md-9">
                    <div class="card border-0 shadow-sm p-xl-2">
                        <div class="card-body">
                            <div class="border-bottom mb-4">
                                <h1 class="h2 text-body-emphasis">Login</h1>
                            </div>
                            <?php if(session('status')): ?>
                                <div class="alert alert-success"><?php echo e(session('status')); ?></div>
                            <?php endif; ?>
                            <form method="post">
                                <!-- Login Email -->
                                <div class="pb-4">
                                    <div class="mb-4">
                                        <?php if($errors->has('email')): ?>
                                            <div class="alert alert-danger">
                                                <?php echo e($errors->first('email')); ?>

                                            </div>
                                        <?php endif; ?>
                                        <label for="txtEmail" class="form-label">Email<span
                                                class="text-danger">*</span></label>
                                        <input class="form-control shadow-sm" type="text" id="txtEmail" name="email"
                                            required>
                                        
                                    </div>
                                    <?php echo csrf_field(); ?>
                                    <div class="mb-4">
                                        <label for="txtPassword" class="form-label">Password<span
                                                class="text-danger">*</span></label>
                                        <input class="form-control shadow-sm" id="txtPassword" name="password"
                                            type="password" required>
                                        <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <div class="text-danger text-sm"><?php echo e($message); ?></div>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </div>
                                    <div class="row">
                                        <div class="col-6">
                                            <div class="mb-4">

                                            </div>
                                        </div>
                                        <div class="col-6">
                                            <div class="mb-4 text-end">
                                                <a href="<?php echo e(route('password.request')); ?>">Forgot password?</a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="mb-6">
                                        <button class="btn btn-primary w-100" type="submit" id="btnSubmit">
                                            <i classass="hicon hicon-aps-lock"></i>
                                            <span id="loginText">Login</span>
                                            <span id="loginLoader" class="spinner-border spinner-border-sm ms-2" style="display: none;"></span>
                                        </button>
                                    </div>
                                </div>
                                 <!-- Login Facebook/Google -->
                                <div class="border-bottom pb-4 mb-4">
                                    <div class="row g-3">
                                        <div class="col-12">
                                            <p>Or Login with Google</p>
                                            <a href="<?php echo e(route('google.redirect')); ?>" class="btn btn-google w-100">
                                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 534 544" width="20"
                                                    height="20">
                                                    <path fill="#4285f4"
                                                        d="M534 278c0-18-2-37-5-55H272v105h147c-6 34-26 64-54 83v68h87c52-48 82-118 82-201z" />
                                                    <path fill="#34a853"
                                                        d="M272 544c74 0 135-24 181-65l-88-68c-25 16-56 26-93 26-71 0-131-48-153-113H29v70c46 92 140 150 243 150z" />
                                                    <path fill="#fbbc04"
                                                        d="M119 324c-11-33-11-70 0-104v-70H29c-39 77-39 168 0 244l90-70z" />
                                                    <path fill="#ea4335"
                                                        d="M272 108c39-1 76 14 105 41l77-78a272 272 0 0 0-425 79l90 70c22-64 82-112 153-112z" />
                                                </svg>
                                                <span class="ms-2">Google</span>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                <!-- /Login Facebook/Google -->
                                <!-- /Login Email -->
                                <div class="mt-4">
                                    <span>Don't have an account? <a href="<?php echo e(url('register')); ?>">Register</a></span>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
    </section>
<script>
    document.addEventListener("DOMContentLoaded", function () {
        document.getElementById("btnSubmit").addEventListener("click", function () {
            // Disable button to prevent multiple clicks
            this.disabled = true;
            
            // Hide text and show spinner
            document.getElementById("loginText").style.display = "none";
            document.getElementById("loginLoader").style.display = "inline-block";
            
            // Submit the form
            this.closest("form").submit();
        });
    });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\enexsim-frontend\resources\views/auth/login.blade.php ENDPATH**/ ?>