<!doctype html>
<html lang="en">


<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Peoplebee</title>
    <link rel="shortcut icon" href="{{ asset('public/favicon.png') }}" type="image/x-icon">

    <!-- begin::global styles -->
    <link rel="stylesheet" href="{{ asset('public/admin/vendors/bundle.css') }}" type="text/css">
    <!-- end::global styles -->

    <!-- begin::custom styles -->
    <link rel="stylesheet" href="{{ asset('public/admin/css/app.min.css') }}" type="text/css">
    <!-- end::custom styles -->
    <meta name="csrf-token" content="{{ csrf_token() }}" />

</head>

<body class="bg-white h-100-vh p-t-0">

    <!-- begin::page loader-->
    <div class="page-loader">
        <div class="spinner-border"></div>
        <span>Loading</span>
    </div>
    <!-- end::page loader -->

    <div class="p-b-50 d-block d-lg-none"></div>

    <div class="container h-100-vh">
        <div class="row align-items-md-center">
            <div class="col-lg-6 d-none d-lg-block">
                <img class="img-fluid" src="{{ asset('public/left-img.jpg') }}" alt="...">
            </div>
            <div class="col-lg-4 offset-lg-1 py-5" >
                <div class="m-b-20">
                                <img src="{{ asset('public/logo.png') }}" class="m-r-15" width="180" alt="">
                            </div>
                            <p>Sign in to continue.</p>
                            <x-flashMessage />

                            <form action="{{ route('login') }}" method="post" >
                                @csrf
                                <div class="form-group mb-4">
                                    <input type="text" class="form-control form-control-lg" name="email"
                                        id="exampleInputEmail1" autofocus placeholder="Email/Mobile">
                                    @if ($errors->has('email'))
                                        <div class="text-danger">
                                            {{ $errors->first('email') }}
                                        </div>
                                    @endif

                                </div>
                                <div class="form-group mb-4">
                                    <input type="password" name="password" class="form-control form-control-lg"
                                        id="exampleInputPassword1" placeholder="Password">
                                    @if ($errors->has('password'))
                                        <div class="text-danger">
                                            {{ $errors->first('password') }}
                                        </div>
                                    @endif
                                </div>
                                {{-- I Agree --}}
                                <div class="d-flex justify-content-between align-items-center mb-4">
                                    <div class="custom-control custom-checkbox">
                                        <input type="checkbox" name="i_agree" class="custom-control-input" id="customCheck">
                                        <label class="custom-control-label" for="customCheck">I Agree with <a href="javascript:;"
                                                data-toggle="modal" data-target="#policyModalLong"><u>Privacy
                                                    Policy</u></a></label>
                                    </div>
                                    <div class="clearfix"></div>
                                    @if ($errors->has('i_agree'))
                                        <div class="text-danger">
                                            {{ $errors->first('i_agree') }}
                                        </div>
                                    @endif
                                </div>
                                <button class="btn btn-primary btn-lg btn-block btn-uppercase mb-4">Sign In</button>
                            </form>
            </div>
        </div>


        
        <footer class="footer">
            <div class=" footer-bar" style='background:white !important;border-top: 1px solid #eaecee !important;'>
                <div class="container text-center">
                    <div class="row align-items-center">
                        <div class="col-sm-6">
                            <a href="{{ asset('/') }}"> <img
                                    src="{{ asset('public/assets/images/logo/blurb2.png') }}" alt=""
                                    style="width:120px;background:white;border-radius:4px;display:flex;margin-top:0px"></a>
                            <p class="mb-0 text-black text-sm mt-2" style='text-align:start;font-size:14px;;'>All
                                Rights Reserved © 2025 Blurb Software Private Limited </p>
                        </div><!--end col-->

                        <div class="col-sm-6" style='display:flex;justify-content:end;'>
                            <div class="text-sm-start">
                                <p style='text-align:end;color:black;position:relative;top:24px;'>Our Products </p>
                                <div class='d-flex'>
                                    <a href="https://edukrypt.com/" target="_blank">
                                        <img src="{{ asset('public/assets/images/logo/logo.png') }}" alt=""
                                            class='ms-2'
                                            style='width:120px;background:;padding:2px;border-radius:4px;object-fit:contain;margin-top:27px;'>
                                    </a>

                                    <a href="https://edumix.com/" target="_blank">
                                        <img src="{{ asset('public/assets/images/logo/edumix.png') }}" alt=""
                                            class='ms-2'
                                            style='width:100px;background:;padding:2px;border-radius:4px;object-fit:contain;position:relative;bottom:5px;'>
                                    </a>
                                    <a href="https://eduvsatpro.com/" target="_blank">
                                        <img src="{{ asset('public/assets/images/logo/eduvsat.png') }}"
                                            alt="" class='ms-2'
                                            style='width:80px;background:;padding:2px;border-radius:4px; object-fit:contain;margin-top:7px;'>
                                    </a>
                                    <a href="https://theinteractive.in/" target="_blank">
                                        <img src="{{ asset('public/assets/images/logo/interactive.png') }}"
                                            alt=""
                                            class='ms-2'style='width:120px;background:;padding:2px;border-radius:4px;object-fit:contain;margin-top:22px;'>
                                    </a>
                                </div>

                            </div>
                        </div><!--end col-->
                    </div><!--end row-->

                </div><!--end container-->
                <hr style='position:relative;margin:0;top:4px;' />
                <p class="mb-0 text-black text-sm"
                    style='text-align:center;position:relative;top:20px;padding:5px;font-size:14px;'><a
                        href="{{ asset('privacy') }}">Privacy Policy</a> | <a href="{{ asset('terms') }}">Terms &
                        Conditions</a> </p>

            </div>
        </footer>
    </div>

    {{-- Model Privacy Policy --}}
    <div class="modal fade bd-example-modal-lg" id="policyModalLong" tabindex="-1" role="dialog"
        aria-labelledby="policyModalLongTitle" aria-hidden="true">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="policyModalLongTitle">Privacy Policy</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <p>Privacy Policy</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close
                    </button>
                </div>
            </div>
        </div>
    </div>
    {{-- End Model --}}

    <!-- begin::global scripts -->
    <script src="{{ asset('public/admin/vendors/bundle.js') }}"></script>
    <!-- end::global scripts -->

    <!-- begin::custom scripts -->
    <script src="{{ asset('public/admin/js/borderless.min.js') }}"></script>
    <!-- end::custom scripts -->

   
    <!-- begin::select2 -->
    <link rel="stylesheet" href="{{ asset('public/admin/vendors/select2/css/select2.min.css') }}" type="text/css">
    <script src="{{ asset('public/admin/vendors/select2/js/select2.min.js') }}"></script>
    <!-- end::select2 -->
    <script>
       
        $(document).ready(function() {
            
           $(".visitor-login-form").submit(function(e){
                e.preventDefault();
                
                $.ajax({
                    type: "post",
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    data:new FormData(this),
                    contentType:false,
                    processData:false,
                    cache:false,
                    url: "{{asset('visitor-otp')}}",
                    success: function(result) 
                    {  
                        var allData = result;
                        console.log(allData);
                        if(allData.message=="success")
                        {
                            $(".visitor-login-form").addClass("d-none");
                            $(".otp-form").removeClass("d-none");
                            var timer = 60;
                            $(".time-running").html("Time Left : "+60);

                            $("#email_input").val(allData.email);
                            $("#message_id").val(allData.message_id);
                            
                            setInterval(function () {
                                timer--;
                                if(timer<=0)
                                {
                                    $(".time-running").attr("mobile",allData.email);
                                    $(".time-running").html("Resend OTP");
                                   
                                }
                                else
                                {
                                    $(".time-running").html("Time Left : "+timer);
                                }
                            }, 1000);

                            $("#otp-input").on("input",function(e){
                                var otp = $(this).val();
                                var len = otp.length;
                                if(len>4)
                                {
                                    e.preventDefault();
                                    $(this).val(otp.slice(0, 4));
                                }
                            });

                            $(".otp-form").submit(function(e){
                                e.preventDefault();
                
                                $.ajax({
                                    type: "post",
                                    headers: {
                                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                                    },
                                    data:new FormData(this),
                                    contentType:false,
                                    processData:false,
                                    cache:false,
                                    url: "{{asset('visitor-otp-verify')}}",
                                    success: function(result) 
                                    { 
                                        if(result.message == "success")
                                        {
                                            $(".otp-form").addClass("d-none");
                                            $(".visitor-password-reset-form").removeClass("d-none");
                                            $("#reset_email").val(result.email);
                                        }
                                    },
                                    error:function(xhr,status,error)
                                    {
                                        console.log(error);
                                    }
                                });

                            });
                           
                        }
                    },
                    error:function(xhr,status,error)
                    {
                        console.log(error);
                    }
                });
           });
            /*function fetchHost()
            {
                
            }*/
        });

       
        
    </script>


</body>



</html>
