<?php if (isset($component)) { $__componentOriginaleb8830356809d16b599bd28accf2e6a22deb6992 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Auth::class, []); ?>
<?php $component->withName('auth'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
    <form id="login-form" action="<?php echo e(route('login')); ?>" class="ajax-form" method="POST">
        <?php echo e(csrf_field()); ?>

        <section class="bg-grey py-5 login_section">
            <div class="container">
                <div class="row">
                    <div class="col-md-12 text-center">
                        <div class="login_box mx-auto rounded bg-white text-center">
                            <h3 class="text-capitalize mb-4 f-w-500"><?php echo app('translator')->get('app.login'); ?></h3>

                            <?php if($errors->any()): ?>
                                <div class="alert alert-danger">
                                    <ul>
                                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <li><?php echo e($error); ?></li>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </ul>
                                </div>
                            <?php endif; ?>

                            <script>
                                const facebook = "<?php echo e(route('social_login', 'facebook')); ?>";
                                const google = "<?php echo e(route('social_login', 'google')); ?>";
                                const twitter = "<?php echo e(route('social_login', 'twitter')); ?>";
                                const linkedin = "<?php echo e(route('social_login', 'linkedin')); ?>";
                            </script>

                            <?php if($socialAuthSettings->google_status == 'enable'): ?>
                                <a class="mb-3 height_50 rounded f-w-500" onclick="window.location.href = google;">
                                    <span>
                                        <img src="<?php echo e(asset('images/google.png')); ?>" alt="Google"/>
                                    </span>
                                    <?php echo app('translator')->get('auth.signInGoogle'); ?></a>
                            <?php endif; ?>
                            <?php if($socialAuthSettings->facebook_status == 'enable'): ?>
                                <a class="mb-3 height_50 rounded f-w-500" onclick="window.location.href = facebook;">
                                    <span>
                                        <img src="<?php echo e(asset('images/fb.png')); ?>" alt="Google"/>
                                    </span>
                                    <?php echo app('translator')->get('auth.signInFacebook'); ?>
                                </a>
                            <?php endif; ?>
                            <?php if($socialAuthSettings->twitter_status == 'enable'): ?>
                                <a class="mb-3 height_50 rounded f-w-500" onclick="window.location.href = twitter;">
                                    <span>
                                        <img src="<?php echo e(asset('images/twitter.png')); ?>" alt="Google"/>
                                    </span>
                                    <?php echo app('translator')->get('auth.signInTwitter'); ?>
                                </a>
                            <?php endif; ?>
                            <?php if($socialAuthSettings->linkedin_status == 'enable'): ?>
                                <a class="mb-3 height_50 rounded f-w-500" onclick="window.location.href = linkedin;">
                                    <span>
                                        <img src="<?php echo e(asset('images/linkedin.png')); ?>" alt="Google"/>
                                    </span>
                                    <?php echo app('translator')->get('auth.signInLinkedin'); ?>
                                </a>
                            <?php endif; ?>

                            <?php if($socialAuthSettings->social_auth_enable): ?>
                                <p class="position-relative my-4"><?php echo app('translator')->get('auth.useEmail'); ?></p>
                            <?php endif; ?>

                            <div class="form-group text-left">
                                <label for="email"><?php echo app('translator')->get('auth.email'); ?></label>
                                <input tabindex="1" type="email" name="email"
                                       class="form-control height-50 f-15 light_text" autofocus
                                       placeholder="<?php echo app('translator')->get('auth.email'); ?>" id="email">
                                <input type="hidden" id="g_recaptcha" name="g_recaptcha">
                            </div>

                            <?php if($socialAuthSettings->social_auth_enable): ?>
                                <button type="submit" id="submit-next"
                                        class="btn-primary f-w-500 rounded w-100 height-50 f-18 "><?php echo app('translator')->get('auth.next'); ?> <i
                                        class="fa fa-arrow-right pl-1"></i></button>
                            <?php endif; ?>

                            <div id="password-section"
                                 <?php if($socialAuthSettings->social_auth_enable): ?> class="d-none" <?php endif; ?>>
                                <div class="form-group text-left">
                                    <label for="password"><?php echo app('translator')->get('app.password'); ?></label>
                                    <?php if (isset($component)) { $__componentOriginal863bfe686851606453ee7ca47b08abfa2e4810a8 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Forms\InputGroup::class, []); ?>
<?php $component->withName('forms.input-group'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
                                        <input type="password" name="password" id="password"
                                            placeholder="<?php echo app('translator')->get('placeholders.password'); ?>" tabindex="3"
                                            class="form-control height-50 f-15 light_text">
                                         <?php $__env->slot('append', null, []); ?> 
                                            <button type="button" data-toggle="tooltip"
                                                data-original-title="<?php echo app('translator')->get('app.viewPassword'); ?>"
                                                class="btn btn-outline-secondary border-grey height-50 toggle-password"><i
                                                    class="fa fa-eye"></i></button>
                                         <?php $__env->endSlot(); ?>
                                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal863bfe686851606453ee7ca47b08abfa2e4810a8)): ?>
<?php $component = $__componentOriginal863bfe686851606453ee7ca47b08abfa2e4810a8; ?>
<?php unset($__componentOriginal863bfe686851606453ee7ca47b08abfa2e4810a8); ?>
<?php endif; ?>
                                </div>
                                <div class="forgot_pswd mb-3">
                                    <a href="<?php echo e(url('forgot-password')); ?>"><?php echo app('translator')->get('app.forgotPassword'); ?></a>
                                </div>

                                <div class="form-group text-left">
                                    <input id="checkbox-signup" type="checkbox" name="remember">
                                    <label for="checkbox-signup"><?php echo app('translator')->get('app.rememberMe'); ?></label>
                                </div>

                                <?php if($setting->google_recaptcha_status == 'active' && $setting->google_recaptcha_v2_status == 'active'): ?>
                                    <div class="form-group" id="captcha_container"></div>
                                <?php endif; ?>

                                <?php if($errors->has('g-recaptcha-response')): ?>
                                    <div class="help-block with-errors"><?php echo e($errors->first('g-recaptcha-response')); ?>

                                    </div>
                                <?php endif; ?>

                                <button type="submit" id="submit-login"
                                        class="btn-primary f-w-500 rounded w-100 height-50 f-18">
                                    <?php echo app('translator')->get('app.login'); ?> <i class="fa fa-arrow-right pl-1"></i>
                                </button>

                                <?php if($setting->allow_client_signup): ?>
                                    <a href="<?php echo e(route('register')); ?>"
                                       class="btn-secondary f-w-500 rounded w-100 height-50 f-15 mt-3">
                                        <?php echo app('translator')->get('app.signUpAsClient'); ?>
                                    </a>
                                <?php endif; ?>

                            </div>

                        </div>

                    </div>
                </div>
            </div>
        </section>
    </form>

     <?php $__env->slot('scripts', null, []); ?> 

        <?php if($setting->google_recaptcha_status == 'active' && $setting->google_recaptcha_v2_status == 'active'): ?>
            <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async
                    defer></script>
            <script>
                var gcv3;
                var onloadCallback = function () {
                    // Renders the HTML element with id 'captcha_container' as a reCAPTCHA widget.
                    // The id of the reCAPTCHA widget is assigned to 'gcv3'.
                    gcv3 = grecaptcha.render('captcha_container', {
                        'sitekey': '<?php echo e($setting->google_recaptcha_v2_site_key); ?>',
                        'theme': 'light',
                        'callback': function (response) {
                            if (response) {
                                $('#g_recaptcha').val(response);
                            }
                        },
                    });
                };
            </script>
        <?php endif; ?>
        <?php if($setting->google_recaptcha_status == 'active' && $setting->google_recaptcha_v3_status == 'active'): ?>
            <script
                src="https://www.google.com/recaptcha/api.js?render=<?php echo e($setting->google_recaptcha_v3_site_key); ?>"></script>
            <script>
                grecaptcha.ready(function () {
                    grecaptcha.execute('<?php echo e($setting->google_recaptcha_v3_site_key); ?>').then(function (token) {
                        // Add your logic to submit to your backend server here.
                        $('#g_recaptcha').val(token);
                    });
                });
            </script>
        <?php endif; ?>

        <script>
            $(document).ready(function () {
                $('#submit-next').click(function () {
                    const url = "<?php echo e(route('check_email')); ?>";
                    $.easyAjax({
                        url: url,
                        container: '#login-form',
                        disableButton: true,
                        buttonSelector: "#submit-next",
                        type: "POST",
                        data: $('#login-form').serialize(),
                        success: function (response) {
                            if (response.status === 'success') {
                                $('#submit-next').remove();
                                $('#password-section').removeClass('d-none');
                                $("#password").focus();
                            }
                        }
                    })
                });

                $('#submit-login').click(function () {

                    const url = "<?php echo e(route('login')); ?>";
                    $.easyAjax({
                        url: url,
                        container: '.login_box',
                        disableButton: true,
                        buttonSelector: "#submit-login",
                        type: "POST",
                        blockUI: true,
                        data: $('#login-form').serialize(),
                        success: function (response) {
                            if (response.two_factor == false) {
                                window.location.href = "<?php echo e(session()->has('url.intended') ? session()->get('url.intended') : route('dashboard')); ?>";
                            } else if (response.two_factor == true) {
                                window.location.href = "<?php echo e(url('two-factor-challenge')); ?>";
                            }
                        }
                    })
                });

                <?php if(session('message')): ?>
                Swal.fire({
                    icon: 'error',
                    text: '<?php echo e(session('message')); ?>',
                    showConfirmButton: true,
                    customClass: {
                        confirmButton: 'btn btn-primary',
                    },
                    showClass: {
                        popup: 'swal2-noanimation',
                        backdrop: 'swal2-noanimation'
                    },
                })
                <?php endif; ?>

            });
        </script>
     <?php $__env->endSlot(); ?>

 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginaleb8830356809d16b599bd28accf2e6a22deb6992)): ?>
<?php $component = $__componentOriginaleb8830356809d16b599bd28accf2e6a22deb6992; ?>
<?php unset($__componentOriginaleb8830356809d16b599bd28accf2e6a22deb6992); ?>
<?php endif; ?>
<?php /**PATH C:\Users\USER\New folder\worksuit\worksuit\resources\views/auth/login.blade.php ENDPATH**/ ?>