<?php
    $subscriberContent=App\Setting::first();
    $subscribeImage=App\BannerImage::first();
    $website_lang=App\ManageText::all();
?>

<!--Start of Tawk.to Script-->
<?php if($subscriberContent->live_chat==1): ?>
<script type="text/javascript">
    var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
    (function(){
        var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
        s1.async=true;
        s1.src='<?php echo e($subscriberContent->livechat_script); ?>';
        s1.charset='UTF-8';
        s1.setAttribute('crossorigin','*');
        s0.parentNode.insertBefore(s1,s0);
    })();
</script>
<?php endif; ?>
<!--End of Tawk.to Script-->

<!--Subscribe Start-->
<div class="subscribe-area" style="background-image: url(<?php echo e($subscribeImage->subscribe_us ?  url($subscribeImage->subscribe_us) : ''); ?>)">
    <div class="container">
        <div class="row ov_hd">
            <div class="col-md-12 wow fadeInDown" data-wow-delay="0.1s">
                <div class="main-headline white">
                    <h1><?php echo e(ucwords($subscriberContent->subscribe_heading)); ?></h1>
                    <p><?php echo e($subscriberContent->subscribe_description); ?></p>
                </div>
            </div>
        </div>
        <div class="row ov_hd">
            <div class="col-md-12 wow fadeInUp" data-wow-delay="0.1s">
                <div class="subscribe-form">
                    <form method="POST" action="<?php echo e(url('subscribe-us')); ?>">
                        <?php echo csrf_field(); ?>
                        <input type="email" required name="email" placeholder="<?php echo e($website_lang->where('lang_key','email_address')->first()->custom_lang); ?>">
                        <button type="submit" class="btn-sub"><?php echo e($website_lang->where('lang_key','subscribe_us')->first()->custom_lang); ?></button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--Subscribe Start-->

<!--Brand-Area Start-->
<div class="brand-area bg-area">
    <div class="container">
        <?php
            $partners=App\Partner::where('status',1)->get();
        ?>
        <div class="row">
            <div class="col-12">
                <div class="brand-carousel owl-carousel">
                    <?php $__currentLoopData = $partners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <a href="<?php echo e($item->link); ?>">
                        <div class="brand-item">
                            <div class="brand-colume">
                                <div class="brand-bg"></div>
                                <img src="<?php echo e(url($item->image)); ?>" alt="Partner">
                            </div>
                        </div>
                    </a>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                </div>
            </div>
        </div>
    </div>
</div>
<!--Brand-Area End-->
<?php
        $contact=App\ContactUs::first();
        $contactInformation=App\ContactInformation::first();
        $logo=App\Setting::first();
        $navbar=App\ManageNavigation::first();
        $navigation=App\Navigation::first();
        $setting=App\Setting::first();
        $isRtl=$setting->text_direction;
?>
<!--Footer Start-->
<div class="main-footer">
    <div class="top-footer">
        <div class="container">
            <div class="row">
                <div class="col-lg-4 col-sm-12">
                    <div class="footer-address">
                        <ul>
                            <li>
                                <i class="far fa-envelope"></i>
                                <h5><?php echo e($website_lang->where('lang_key','email_address')->first()->custom_lang); ?> </h5>
                                <p><?php echo nl2br(e($contactInformation->emails)); ?></p>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="col-lg-4 col-sm-12">
                    <div class="footer-address">
                        <ul>
                            <li>
                                <i class="fas fa-phone"></i>
                                <h5><?php echo e($website_lang->where('lang_key','phone')->first()->custom_lang); ?></h5>
                                <p><?php echo nl2br(e($contactInformation->phones)); ?></p>

                            </li>
                        </ul>
                    </div>
                </div>
                <div class="col-lg-4 col-sm-12">
                    <div class="footer-address">
                        <ul>
                            <li>
                                <i class="fas fa-map-marker-alt"></i>
                                <h5><?php echo e($website_lang->where('lang_key','address')->first()->custom_lang); ?></h5>
                                <p><?php echo nl2br(e($contactInformation->address)); ?></p>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-area" style="background-image: url(<?php echo e(url('client/img/shape-2.png')); ?>)">
        <div class="container">
            <div class="row">
                <div class="col-lg-4 col-md-6 col-sm-12">
                    <div class="footer-item">
                        <h3><?php echo e($website_lang->where('lang_key','about_us')->first()->custom_lang); ?></h3>
                        <div class="textwidget">
                            <p>
                                <?php echo e($contactInformation->about); ?>

                            </p>


                            <?php if($isRtl=='RTL'): ?>
                            <a class="sm_fbtn" href="<?php echo e(url('about-us')); ?>"><?php echo e($website_lang->where('lang_key','learn_more')->first()->custom_lang); ?> ←</a>
                            <?php else: ?>
                            <a class="sm_fbtn" href="<?php echo e(url('about-us')); ?>"><?php echo e($website_lang->where('lang_key','learn_more')->first()->custom_lang); ?> →</a>
                            <?php endif; ?>

                        </div>
                    </div>
                </div>
                <div class="col-lg-4 col-md-6 col-sm-12">
                    <div class="footer-item">
                        <h3><?php echo e($website_lang->where('lang_key','important_link')->first()->custom_lang); ?></h3>
                        <ul>
                            <?php if($navbar->show_homepage==1): ?>
                                <li><a href="<?php echo e(url('/')); ?>"><?php echo e($navigation->home); ?></a></li>
                            <?php endif; ?>
                            <?php if($navbar->show_aboutus==1): ?>
                                <li><a href="<?php echo e(url('about-us')); ?>"><?php echo e($navigation->about_us); ?></a></li>
                            <?php endif; ?>
                            <?php if($navbar->show_department): ?>
                                <li><a href="<?php echo e(url('department')); ?>"><?php echo e($navigation->department); ?></a></li>
                            <?php endif; ?>
                            <?php if($navbar->show_doctor): ?>
                                <li><a href="<?php echo e(url('doctor')); ?>"><?php echo e($navigation->doctor); ?></a></li>
                            <?php endif; ?>



                            <li><a href="<?php echo e(url('terms-condition')); ?>"><?php echo e($navigation->terms_and_condition); ?></a></li>
                            <li><a href="<?php echo e(url('privacy-policy')); ?>"><?php echo e($navigation->privacy_policy); ?></a></li>
                            <?php if($navbar->show_blog==1): ?>
                            <li><a href="<?php echo e(url('blog')); ?>"><?php echo e($navigation->blog); ?></a></li>
                            <?php endif; ?>
                            <?php if($navbar->show_contactus==1): ?>
                            <li><a href="<?php echo e(url('contact-us')); ?>"><?php echo e($navigation->contact_us); ?></a></li>
                            <?php endif; ?>


                        </ul>
                    </div>
                </div>
                <div class="col-lg-4 col-md-12 col-sm-12">
                    <?php
                        $latestBlogs=App\Blog::orderBy('id','desc')->take(3)->get();
                    ?>
                    <div class="footer-item">
                        <h3><?php echo e($website_lang->where('lang_key','recent_posts')->first()->custom_lang); ?></h3>
                        <?php $__currentLoopData = $latestBlogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="footer-recent-item">
                            <div class="footer-recent-photo">
                                <a href="<?php echo e(url('blog-details/'.$item->slug)); ?>"><img src="<?php echo e(url($item->thumbnail_image)); ?>" alt="blog image"></a>
                            </div>
                            <div class="footer-recent-text">
                                <a href="<?php echo e(url('blog-details/'.$item->slug)); ?>"><?php echo e($item->title); ?></a>
                                <div class="footer-post-date"><?php echo e($item->created_at->format('m-d-Y')); ?></div>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-copyrignt">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <div class="copyright-text">
                        <p><?php echo e($contactInformation->copyright); ?></p>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="footer-social">
                        <?php if($contact->facebook): ?>
                        <a href="<?php echo e($contact->facebook); ?>"><i class="fab fa-facebook-f"></i></a>
                        <?php endif; ?>
                        <?php if($contact->twitter): ?>
                        <a href="<?php echo e($contact->twitter); ?>"><i class="fab fa-twitter"></i></a>
                        <?php endif; ?>
                        <?php if($contact->pinterest): ?>
                        <a href="<?php echo e($contact->pinterest); ?>"><i class="fab fa-pinterest-p"></i></a>
                        <?php endif; ?>
                        <?php if($contact->linkedin): ?>
                        <a href="<?php echo e($contact->linkedin); ?>"><i class="fab fa-linkedin-in"></i></a>
                        <?php endif; ?>
                        <?php if($contact->youtube): ?>
                        <a href="<?php echo e($contact->youtube); ?>"><i class="fab fa-youtube"></i></a>
                        <?php endif; ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--Footer End-->

<?php
    $cookie=App\Setting::first();
    $setting=App\Setting::first();
?>
<?php if($cookie->allow_cookie_consent==1): ?>
<div class="cookie-container">
    <p>
      <?php echo clean($cookie->cookie_text); ?>

    </p>

    <button class="cookie-btn">
      <?php echo e(ucwords($cookie->cookie_button_text)); ?>

    </button>
  </div>

<?php endif; ?>


<!--Scroll-Top-->
<div class="scroll-top">
    <i class="fas fa-angle-double-up"></i>
</div>
<!--Scroll-Top-->

<script>
    var isRtl="<?php echo e($isRtl); ?>"
    var rtlTrue=false;
    if(isRtl=='RTL'){
        rtlTrue=true;
    }
</script>

<!--Js-->
<script src="<?php echo e(url('client/js/jquery-3.6.0.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/bootstrap.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/popper.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/jquery-ui.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/jquery.magnific-popup.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/jquery.collapse.js')); ?>"></script>
<script src="<?php echo e(url('client/js/owl.carousel.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/swiper-bundle.js')); ?>"></script>
<script src="<?php echo e(url('client/js/jquery.filterizr.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/select2.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/wow.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/viewportchecker.js')); ?>"></script>
<script src="<?php echo e(url('client/js/bootstrap-datepicker.min.js')); ?>"></script>
<script src="<?php echo e(url('client/js/cookie-consent.js')); ?>"></script>
<script src="<?php echo e(asset('client/js/jquery-ui.js')); ?>"></script>
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>

<script src="<?php echo e(url('client/js/custom.js')); ?>"></script>

<script src="https://js.pusher.com/7.0/pusher.min.js"></script>
<script src="<?php echo e(asset('toastr/toastr.min.js')); ?>"></script>
<script>
    <?php if(Session::has('messege')): ?>
      var type="<?php echo e(Session::get('alert-type','info')); ?>"
      switch(type){
          case 'info':
               toastr.info("<?php echo e(Session::get('messege')); ?>");
               break;
          case 'success':
              toastr.success("<?php echo e(Session::get('messege')); ?>");
              break;
          case 'warning':
             toastr.warning("<?php echo e(Session::get('messege')); ?>");
              break;
          case 'error':
              toastr.error("<?php echo e(Session::get('messege')); ?>");
              break;
      }
    <?php endif; ?>
</script>

<?php if($errors->any()): ?>
    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <script>
            toastr.error('<?php echo e($error); ?>');
        </script>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>


<script>
    //Search
    function openSearch() {
        document.getElementById("myOverlay").style.display = "block";
    }

    function closeSearch() {
        document.getElementById("myOverlay").style.display = "none";
    }

    //Mobile Menu
    function openNav() {
        document.getElementById("mySidenav").style.width = "100%";
    }

    function closeNav() {
        document.getElementById("mySidenav").style.width = "0";
    }

	(function($) {

    "use strict";
    // load available appointment in doctor details
    $(document).on('change', '#datepicker-value', function() {
            var value=$(this).val();
            var lawyer_id=$("#lawyer_id").val();
            var url="<?php echo e(url('/get-appointment/')); ?>";
            $.ajax({
            type: 'GET',
            url: url,
            data:{'lawyer_id':lawyer_id,'date':value},
            success: function (response) {
                if(response.success){
                    $("#doctor-available-schedule").html(response.success)
                    $("#schedule-box-outer").removeClass('d-none')
                    $("#doctor-schedule-error").addClass('d-none')
                    $("#sub").prop("disabled", false);
                }
                if(response.error){
                    $("#schedule-box-outer").addClass('d-none')
                    $("#doctor-schedule-error").removeClass('d-none')
                    $("#doctor-schedule-error").html(response.error)
                    $("#sub").prop("disabled", true);
                }

            },
            error: function(err) {
                console.log(err);
            }
        });
    });
	})(jQuery);


    // load doctor in modal
    function loadDoctor(){
        var id=$(".department-id").val();
        if(id){
            var url="<?php echo e(url('get-department-doctor/')); ?>"+"/"+id;
            $.ajax({
                type: 'GET',
                url: url,
                success: function (response) {
                    $(".lawyer-id").html(response)
                    $("#modal-doctor-box").removeClass('d-none')
                },
                error: function(err) {
                    console.log(err);
                }
            });

        }
    }
    // load doctor in mobile menu modal
    function loadMobileModalDoctor(){
        var id=$(".modal-department-id").val();
        if(id){
            var url="<?php echo e(url('get-department-doctor/')); ?>"+"/"+id;
            $.ajax({
                type: 'GET',
                url: url,
                success: function (response) {
                    $(".modal-lawyer-id").html(response)
                    $("#mobile-modal-doctor-box").removeClass('d-none')
                },
                error: function(err) {
                    console.log(err);
                }
            });

        }
    }

    // load date in modal
    function loadDate(){
        var lawyerId=$('.lawyer-id').val()
        $('#modal_lawyer_id').val(lawyerId)
        $("#modal-date-box").removeClass('d-none')

    }

    // load date in mobile menu modal
    function loadModalDate(){
        var lawyerId=$('.modal-lawyer-id').val()
        $('#mobile_modal_lawyer_id').val(lawyerId)
        $("#mobile-modal-date-box").removeClass('d-none')

    }




	(function($) {

    "use strict";
    // load available appointment in appoinment model
    $(document).on('change', '#modal-datepicker-value', function() {
            var value=$(this).val();
            var lawyer_id=$("#modal_lawyer_id").val();
            var url="<?php echo e(url('/get-appointment/')); ?>";
            $.ajax({
            type: 'GET',
            url: url,
            data:{'lawyer_id':lawyer_id,'date':value},
            success: function (response) {
                if(response.success){
                    $("#available-modal-schedule").html(response.success)
                    $("#modal-schedule-box").removeClass('d-none')
                    $("#modal-schedule-error").addClass('d-none')
                    $("#modal-sub").prop("disabled", false);
                }
                if(response.error){
                    $("#modal-schedule-box").addClass('d-none')
                    $("#modal-schedule-error").removeClass('d-none')
                    $("#modal-schedule-error").html(response.error)
                    $("#modal-sub").prop("disabled", true);


                }
            },
            error: function(err) {
                console.log(err);
            }
        });
    });

    // load available appointment in appoinment model
    $(document).on('change', '#mobile-modal-datepicker-value', function() {
            var value=$(this).val();
            var lawyer_id=$("#mobile_modal_lawyer_id").val();
            var url="<?php echo e(url('/get-appointment/')); ?>";
            $.ajax({
            type: 'GET',
            url: url,
            data:{'lawyer_id':lawyer_id,'date':value},
            success: function (response) {
                if(response.success){
                    $("#available-mobile-modal-schedule").html(response.success)
                    $("#mobile-modal-schedule-box").removeClass('d-none')
                    $("#mobile-modal-schedule-error").addClass('d-none')
                    $("#mobile-modal-sub").prop("disabled", false);
                }
                if(response.error){
                    $("#mobile-modal-schedule-box").addClass('d-none')
                    $("#mobile-modal-schedule-error").removeClass('d-none')
                    $("#mobile-modal-schedule-error").html(response.error)
                    $("#mobile-modal-sub").prop("disabled", true);
                }
            },
            error: function(err) {
                console.log(err);
            }
        });
    });
	})(jQuery);


// stripe

$(function() {
    var $form         = $(".require-validation");
  $('form.require-validation').bind('submit', function(e) {
    var $form         = $(".require-validation"),
        inputSelector = ['input[type=email]', 'input[type=password]',
                         'input[type=text]', 'input[type=file]',
                         'textarea'].join(', '),
        $inputs       = $form.find('.required').find(inputSelector),
        $errorMessage = $form.find('div.error'),
        valid         = true;
        $errorMessage.addClass('d-none');

        $('.has-error').removeClass('has-error');
    $inputs.each(function(i, el) {
      var $input = $(el);
      if ($input.val() === '') {
        $input.parent().addClass('has-error');
        $errorMessage.removeClass('d-none');
        e.preventDefault();
      }
    });

    if (!$form.data('cc-on-file')) {
      e.preventDefault();
      Stripe.setPublishableKey($form.data('stripe-publishable-key'));
      Stripe.createToken({
        number: $('.card-number').val(),
        cvc: $('.card-cvc').val(),
        exp_month: $('.card-expiry-month').val(),
        exp_year: $('.card-expiry-year').val()
      }, stripeResponseHandler);
    }

  });

  function stripeResponseHandler(status, response) {
        if (response.error) {
            $('.error')
                .removeClass('hide')
                .find('.alert')
                .text(response.error.message);
        } else {
            // token contains id, last4, and card type
            var token = response['id'];
            // insert the token into the form so it gets submitted to the server
            $form.find('input[type=text]').empty();
            $form.append("<input type='hidden' name='stripeToken' value='" + token + "'/>");
            $form.get(0).submit();
        }
    }

});




</script>

<script>

    var receiver_id = '';
    <?php if(auth()->guard()->check()): ?>
    var my_id = "<?php echo e(Auth::guard('web')->user()->id); ?>";
    <?php endif; ?>


	(function($) {

    "use strict";

    $(document).ready(function () {
        $('.user').on('click',function () {
            $('.user').removeClass('active');
            $(this).addClass('active');
            $(this).find('.pending').remove();

            receiver_id = $(this).attr('id');
            $.ajax({
                type: "get",
                url: "<?php echo e(url('client/get-message/')); ?>"+ "/" + receiver_id,
                data: "",
                cache: false,
                success: function (data) {
                    $('#messages').html(data);
                    scrollToBottomFunc();
                }
            });
        });

        $(document).on('keyup', '.input-text input', function (e) {
            var message = $(this).val();

            if(message != ''){
                $("#sentMessageBtn").prop("disabled", false);
            }else{
                $("#sentMessageBtn").prop("disabled", true);
            }

            if (e.keyCode == 13 && message != '' && receiver_id != '') {
                $(this).val('');

                var datastr = "receiver_id=" + receiver_id + "&message=" + message;
                // project demo mode check
                var isDemo="<?php echo e(env('PROJECT_MODE')); ?>"
                var demoNotify="<?php echo e(env('NOTIFY_TEXT')); ?>"
                if(isDemo==0){
                    toastr.error(demoNotify);
                    return;
                }
                // end
                $.ajax({
                    type: "get",
                    url: "<?php echo e(url('/client/send-message')); ?>",
                    data: datastr,
                    cache: false,
                    success: function (data) {
                        scrollToBottomFunc();
                        $('#' + data.lawyer_id).click();

                    },
                    error: function (jqXHR, status, err) {
                    }
                })
            }
        });


        $(document).on('click', '#zoom_demo_mode', function () {
        var demoNotify="<?php echo e(env('NOTIFY_TEXT')); ?>"
        toastr.error(demoNotify);
    });

    });
	})(jQuery);


    // make a function to scroll down auto
    function scrollToBottomFunc() {
        $('.message-wrapper').animate({
            scrollTop: $('.message-wrapper').get(0).scrollHeight
        }, 50);
    }

    // send messag by click button
    function sendMessage(){
        var message=$(".submit").val();
        $(".submit").val('');
        var datastr = "receiver_id=" + receiver_id + "&message=" + message;

        // project demo mode check
        var isDemo="<?php echo e(env('PROJECT_MODE')); ?>"
         var demoNotify="<?php echo e(env('NOTIFY_TEXT')); ?>"
         if(isDemo==0){
             toastr.error(demoNotify);
             return;
         }
         // end
        $.ajax({
            type: "get",
            url: "<?php echo e(url('/client/send-message')); ?>",
            data: datastr,
            cache: false,
            success: function (data) {
                scrollToBottomFunc();
                $('#' + data.lawyer_id).click();
            },
            error: function (jqXHR, status, err) {
            }
        })


    }

</script>

</body>

</html>
<?php /**PATH C:\xampp\htdocs\wsus-cc\4_lawment_ibrahim\script_content\main_files\resources\views/layouts/client/footer.blade.php ENDPATH**/ ?>