<?php $__env->startSection('content'); ?>
    <div class="h-100">
        <div class="h-100 no-gutters row">
            <div class="d-none d-lg-block h-100 col-lg-5 col-xl-4">
                <div class="left-caption">
                    <img src="<?php echo e(Login_Image()); ?>" class="bg-img"/>
                    <div class="caption">
                        <div>
                            <!-- logo -->
                            <h1 style="font-size: 60px; font-weight: bold;"><?php echo e(App_Name()); ?></h1>

                            <?php $setting = Setting_Data();?>
                            <p class="text">
                                <?php echo e(String_Cut($setting['app_desripation'], 200)); ?>

                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="h-100 d-flex login-bg justify-content-center align-items-lg-center col-md-12 col-lg-7 col-xl-8">
                <div class="mx-auto col-sm-12 col-md-10 col-xl-8">
                    <div class="py-5">

                        <div class="app-logo mb-4">
                            <h1 class="primary-color mb-4 d-block d-lg-none"><?php echo e(App_Name()); ?></h1>
                            <h3 class="primary-color mb-0 font-weight-bold"><?php echo e(__('label.login')); ?></h3>
                        </div>

                        <h4 class="mb-0 font-weight-bold">
                            <span class="d-block mb-2"><?php echo e(__('label.welcome_back_admin')); ?></span>
                            <span><?php echo e(__('label.please_sign_in_to_your_account')); ?></span>
                        </h4>

                        <?php
                            $emailValue = env('DEMO_MODE') == 'ON' ? 'admin@admin.com' : '';
                            $passwordValue = env('DEMO_MODE') == 'ON' ? 'admin' : '';
                        ?>
                        <form id="login_form">
                            <div class="form-row mt-4">
                                <div class="col-md-6">
                                    <div class="position-relative form-group">
                                        <label><?php echo e(__('label.email')); ?></label>
                                        <input name="email" type="email" value="<?php echo e($emailValue); ?>" placeholder="<?php echo e(__('label.email_here')); ?>" class="form-control" autofocus>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="position-relative form-group">
                                        <label><?php echo e(__('label.password')); ?></label>
                                        <input name="password" type="password" value="<?php echo e($passwordValue); ?>" placeholder="<?php echo e(__('label.password_here')); ?>" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="form-row">
                                <div class="col-sm-6 text-center text-sm-left">
                                    <button class="btn btn-default mw-120" onclick="save_login()" type="button"><?php echo e(__('label.login')); ?></button>
                                </div>
                            </div>
                        </form>

                        <?php if( env('DEMO_MODE') == 'ON'): ?> 
                            <hr>
                            <h6>
                                <?php echo e(__('label.if_you_cannot_login_then')); ?><a href="<?php echo e(env('APP_URL'). '/public/admin/login'); ?>" target="_blank" class="btn-link"><?php echo e(__('label.click_here')); ?></a>
                            </h6>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('pagescript'); ?>
    <script>
        function save_login() {
            $("#dvloader").show();
            var formData = new FormData($("#login_form")[0]);
            $.ajax({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                },
                type: 'POST',
                url: '<?php echo e(route("admin.save.login")); ?>',
                data: formData,
                cache: false,
                contentType: false,
                processData: false,
                success: function(resp) {
                    $("#dvloader").hide();
                    get_responce_message(resp, 'login_form', '<?php echo e(route("admin.dashboard")); ?>');
                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    $("#dvloader").hide();
                    toastr.error(errorThrown, textStatus);
                }
            });
        }

        // Press Enter Key & Save Form
        $('#login_form').keypress((e) => { 
            // Enter key corresponds to number 13 
            if (e.which === 13) { 
                save_login();
            } 
        })
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layout.page-app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /opt/lampp/htdocs/envato/app/dtlive/resources/views/admin/login/login.blade.php ENDPATH**/ ?>