<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>iTro.vn - Tìm là thấy, ở là thích</title>

    <!-- Meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="description" content="Itro.vn">
    <meta name="author" content="Itro.vn">
    <meta name="copyright" content="Itro.vn">

    <!-- Favicon -->
    <link rel="shortcut icon" href="/frontend3/assets/img/favicon_16.ico"/>
    <link rel="bookmark" href="/frontend3/assets/img/favicon_16.ico"/>

    <!-- CSS: Libs-->
    <link rel="stylesheet" href="/frontend3/assets/libs/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/frontend3/assets/libs/select2/css/select2.min.css">
    <link rel="stylesheet" href="/frontend3/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css">
    <link rel="stylesheet" href="/frontend3/assets/libs/bootstrap-touchspin/jquery.bootstrap-touchspin.min.css">
    <link rel="stylesheet" href="/frontend3/assets/libs/bootstrap-slider/css/slider.css">
    <link rel="stylesheet" href="/frontend3/assets/libs/fancybox/jquery.fancybox.min.css">
    <link rel="stylesheet" href="/frontend3/assets/libs/slick/slick.css">
    <!-- <link rel="stylesheet" href="/frontend3/assets/libs/slick/slick-theme.css"> -->
    <!-- CSS: Main -->
    <link rel="stylesheet" href="/frontend3/assets/libs/noUiSlider/nouislider.min.css">

    <link rel="stylesheet" href="/frontend3/assets/css/custom.css">
    <link rel="stylesheet" href="/frontend3/assets/css/jquery.toast.min.css">
    <link rel="stylesheet" href="/frontend3/assets/css/smartbanner.min.css">


    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>


    <![endif]-->
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

    <!-- favicon -->
    <link rel="apple-touch-icon" sizes="57x57" href="/frontend3/favicon/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/frontend3/favicon/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/frontend3/favicon/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/frontend3/favicon/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/frontend3/favicon/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/frontend3/favicon/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/frontend3/favicon/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/frontend3/favicon/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/frontend3/favicon/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192" href="/frontend3/favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/frontend3/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="/frontend3/favicon/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/frontend3/favicon/favicon-16x16.png">
    <link rel="manifest" href="/frontend3/favicon/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/frontend3/favicon/ms-icon-144x144.png">
    <meta name="theme-color" content="#ffffff">

    <!-- Start SmartBanner configuration -->

    <?php if(!auth('backend')->check()): ?>
        <meta name="smartbanner:title" content="Ứng dụng itro cho chủ trọ">
        <meta name="smartbanner:button-url-apple" content="https://itunes.apple.com/vn/app/itro-qu%E1%BA%A3n-l%C3%BD-tr%E1%BB%8D-th%C3%B4ng-minh/id1352848785?mt=8&ign-mpt=uo%3D4">
        <meta name="smartbanner:button-url-google" content="https://play.google.com/store/apps/details?id=com.blue.hoantran.itro_host">
    <?php else: ?>
        <meta name="smartbanner:title" content="Ứng dụng itro cho chủ trọ">
        <meta name="smartbanner:button-url-apple" content="https://itunes.apple.com/vn/app/itro-qu%E1%BA%A3n-l%C3%BD-tr%E1%BB%8D-th%C3%B4ng-minh/id1352848785?mt=8&ign-mpt=uo%3D4">
        <meta name="smartbanner:button-url-google" content="https://play.google.com/store/apps/details?id=com.blue.hoantran.itro_host">

    <?php endif; ?>

    <meta name="smartbanner:author" content="Itro.vn">
    <meta name="smartbanner:price" content="Miễn phí">
    <meta name="smartbanner:price-suffix-apple" content=" - Trên App Store">
    <meta name="smartbanner:price-suffix-google" content=" - Trên Google Play">
    <meta name="smartbanner:icon-apple"
          content="https://a3.mzstatic.com/us/r30/Purple60/v4/c1/3b/b0/c13bb085-64c0-cc90-f97a-521b96963986/icon350x350.jpeg">
    <meta name="smartbanner:icon-google"
          content="https://lh3.ggpht.com/f4oX61ljZ6x8aYDELZOgxlvdUEu73-wSQ4fy5bx6fCRISnZP8T353wdaM43RO_DbGg=w300">
    <meta name="smartbanner:button" content="Tải ngay">

    <meta name="smartbanner:enabled-platforms" content="android,ios">


    <?php echo $__env->yieldContent('meta'); ?>
    <?php echo $__env->yieldContent('styles'); ?>
    <style>
        .modal {
            overflow-y:auto;
        }


    </style>
    <style>


        .ht-on-loading {
            display: block;
            position: relative;
        }

        .ht-on-loading:after {
            content: "";
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, .6);
            background-image: url('/spinner.gif');
            background-position: 50% 50%;
            -webkit-background-size: 36px 36px;
            background-size: 36px 36px;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>

<div id="siteContainer" class="site-wrapper">

    <!-- site header -->
    <header id="siteHeader" class="site-header">
        <div class="site-header__mainbar">
            <div class="container-fluid">
                <?php if(!auth('backend')->check()): ?>
                    <div class="sh__mainbar__container">

                        <!-- logo -->
                        <h1 class="sh__site-logo"><a href="<?php echo e(url('/')); ?>"
                                                     style="background-image: url('/frontend3/assets/img/logo.png')">Tìm
                                nhà
                                trọ</a></h1>
                        <!-- END logo -->

                        <!-- desktop nav -->
                        <div class="sh__desktop-screen-navbar hidden-xs hidden-sm">
                            <div class="flex flex-ai-center flex-jc-between">
                                <div class="flex-item">
                                    <ul class="sh__nav-list">
                                        <li class="sh__nav-list__item"><a href="<?php echo e(url('tim-kiem')); ?>"
                                                                          class="single-item single-item--text text-uppercase">Tìm
                                                nhà trọ</a></li>
                                        
                                                                          
                                                
                                    </ul>
                                </div>
                                <div class="flex-item">
                                    <ul class="sh__nav-list">
                                        <li class="sh__nav-list__item"><a href="#modal__sign-up"
                                                                          class="single-item single-item--text"
                                                                          data-toggle="modal">Đăng ký</a></li>
                                        <li class="divider"></li>
                                        <li class="sh__nav-list__item"><a href="#modal__sign-in"
                                                                          class="single-item single-item--text"
                                                                          data-toggle="modal">Đăng nhập</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <!-- END Desktop Nav -->

                        <!-- mobile nav -->
                        <div class="sh__mobile-screen-navbar hidden-md hidden-lg">
                            <ul class="sh__nav-list">
                                <li class="sh__nav-list__item"><a href="#" class="collapse-icon-item collapsed"
                                                                  data-toggle="collapse"
                                                                  data-target="#siteHeaderNavbarCollapse"><i
                                                class="ion-navicon"></i></a></li>
                            </ul>
                        </div>
                        <div id="siteHeaderNavbarCollapse"
                             class="sh__mobile-screen-navmenu collapse hidden-md hidden-lg">
                            <ul class="sh__nav-list-mobile">
                                <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'tim-kiem')): ?> active <?php endif; ?>"><a href="<?php echo e(url('tim-kiem')); ?>"
                                                                                                                                    class="single-item single-item--text text-uppercase">Tìm
                                        nhà trọ</a></li>
                                <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'tim-o-ghep')): ?> active <?php endif; ?>">
                                    <a href="<?php echo e(url('tim-o-ghep')); ?>"
                                       class="single-item single-item--text text-uppercase">Tìm
                                        ở ghép</a></li>
                                <li class="sh__nav-list__item"><a href="#modal__sign-up"
                                                                  class="single-item single-item--text"
                                                                  data-toggle="modal">Đăng
                                        ký</a></li>
                                <li class="sh__nav-list__item"><a href="#modal__sign-in"
                                                                  class="single-item single-item--text"
                                                                  data-toggle="modal">Đăng
                                        nhập</a></li>
                                <li class="sh__nav-list__item">
                                    <ul class="sh__inner-list pt-12">
                                        <li class="sh__inner-list__item"><a href="tel:0868987355"
                                                                            class="single-inner-item single-inner-item--text"><i
                                                        class="single-item__icon ion-android-call mr-8"></i><span
                                                        class="single-item__text">0868.987.355</span></a></li>
                                        <li class="sh__inner-list__item"><a href="mailto:support@itro.vn"
                                                                            class="single-inner-item single-inner-item--text"><i
                                                        class="single-item__icon ion-android-mail mr-8"></i><span
                                                        class="single-item__text">support@itro.vn</span></a></li>
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                    </ul>
                                </li>
                            </ul>
                        </div>
                        <!-- END mobile nav -->

                    </div>
                <?php else: ?>
                    <div class="sh__mainbar__container">

                        <!-- logo -->
                        <h1 class="sh__site-logo"><a href="<?php echo e(url('/')); ?>"
                                                     style="background-image: url('/frontend3/assets/img/logo.png')">Tìm
                                nhà trọ</a></h1>
                        <!-- END logo -->

                        <!-- desktop nav -->
                        <div class="sh__desktop-screen-navbar hidden-xs hidden-sm">
                            <div class="flex flex-ai-center flex-jc-between">
                                <div class="flex-item">
                                    <ul class="sh__nav-list">
                                        <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'tim-kiem')): ?> active <?php endif; ?>">
                                            <a href="<?php echo e(url('tim-kiem')); ?>"
                                               class="single-item single-item--text text-uppercase">Tìm
                                                nhà trọ</a></li>
                                        <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'tim-o-ghep')): ?> active <?php endif; ?>">
                                            <a href="<?php echo e(url('tim-o-ghep')); ?>"
                                               class="single-item single-item--text text-uppercase">Tìm
                                                ở ghép</a></li>
                                        <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'wishlist')): ?> active <?php endif; ?> ">
                                            <a href="<?php echo e(url('wishlist')); ?>"
                                               class="single-item single-item--text text-uppercase">Yêu
                                                thích</a></li>
                                    </ul>
                                </div>
                                <div class="flex-item">
                                    <ul class="sh__nav-list">
                                        <?php if(auth('backend')->user()->type == \App\User::RENTER): ?>
                                            <li class="sh__nav-list__item sh__nav-list__item--has-btn">
                                                <a href="<?php echo e(url('tim-ban')); ?>"
                                                   class="btn ht-btn-secondary d-iblock fw-500 btn-thicken-border">Tìm
                                                    bạn ở ghép</a>
                                            </li>
                                        <?php endif; ?>
                                        <?php if(auth('backend')->user()->type == \App\User::OWNER): ?>
                                            <li class="sh__nav-list__item sh__nav-list__item--has-btn">
                                                <a href="<?php echo e(url('admin2/dashboard')); ?>"
                                                   class="btn ht-btn-secondary d-iblock fw-500 btn-thicken-border">Phần
                                                    mềm quản lý</a>
                                            </li>
                                        <?php endif; ?>
                                        <li class="divider"></li>
                                        <li class="sh__nav-list__item mr-8">
                                            <div class="dropdown">
                                                <a href="#" class="single-item single-item--notify"
                                                   data-toggle="dropdown">
                                                    <span class="notify-icon"><i class="ion-md-notifications"></i></span>
                                                    <span class="notify-label hidden">Thông báo</span>
                                                    <span class="notifi-count" id="ntf-count">0</span>
                                                </a>
                                                <div class="dropdown-menu sh__notify-dropdown-menu pull-right">
                                                    <div class="sh__notify-header">
                                                        <h5 class="sh_notify-header__title">Thông báo</h5>
                                                        <a href="<?php echo e(url('notification')); ?>"
                                                           class="sh_notify-header__view-more">Xem tất cả</a>
                                                    </div>
                                                    <ul class="sh__notify-list" id="notify-list">

                                                    </ul>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="sh__nav-list__item">
                                            <div class="dropdown">
                                                <a href="#" class="single-item single-item--notify">
                                                    <span class="notify-icon"><i class="ion-ios-chatbubbles"></i></span>
                                                    <span class="notify-label hidden">Tin nhắn</span>
                                                    <span class="notifi-count" id="ntf-msg-count">0</span>
                                                </a>
                                            </div>
                                        </li>
                                        <li class="divider"></li>
                                        <li class="sh__nav-list__item">
                                            <div class="dropdown">
                                                <a href="#" class="single-item single-item--user"
                                                   data-toggle="dropdown">
                                                    <span class="user-avatar" style="border: 2px solid #ff5722"><img
                                                                src="<?php echo e(auth('backend')->user()->image); ?>"
                                                                alt=""></span>
                                                    <span class="user-title"><?php echo e(auth('backend')->user()->name_text_text); ?></span>
                                                    <span class="user-dropdown-icon ion-ios-arrow-down"></span>
                                                </a>
                                                <div class="dropdown-menu sh__dropdown-menu pull-right">
                                                    <ul class="sh__menu-list">
                                                        <li class="sh__list__item"><a href="<?php echo e(url('profile')); ?>"
                                                                                      class="#">Thông tin tài
                                                                khoản</a></li>
                                                        <li class="sh__list__item"><a href="#" class="#">Hướng dẫn &amp;
                                                                Trợ giúp</a></li>
                                                        <li class="sh__list__item"><a href="<?php echo e(url('logout')); ?>"
                                                                                      class="#">Đăng xuất</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <!-- END Desktop Nav -->

                        <!-- mobile nav -->
                        <div class="sh__mobile-screen-navbar hidden-md hidden-lg">
                            <ul class="sh__nav-list">
                                <li class="sh__nav-list__item"><a href="#" class="collapse-icon-item collapsed"
                                                                  data-toggle="collapse"
                                                                  data-target="#siteHeaderNavbarCollapse"><i
                                                class="ion-navicon"></i></a></li>
                            </ul>
                        </div>
                        <div id="siteHeaderNavbarCollapse"
                             class="sh__mobile-screen-navmenu collapse hidden-md hidden-lg">
                            <ul class="sh__nav-list-mobile">
                                <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'tim-kiem')): ?> active <?php endif; ?>"><a href="<?php echo e(url('tim-kiem')); ?>"
                                                                                                                                    class="single-item single-item--text text-uppercase">Tìm
                                        nhà trọ</a></li>
                                <li class="sh__nav-list__item <?php if(str_contains(request()->fullUrl(), 'tim-o-ghep')): ?> active <?php endif; ?>">
                                    <a href="<?php echo e(url('tim-o-ghep')); ?>"
                                       class="single-item single-item--text text-uppercase">Tìm
                                        ở ghép</a></li>
                                <li class="sh__nav-list__item"><a href="<?php echo e(url('wishlist')); ?>"
                                                                  class="single-item single-item--text text-uppercase">Yêu
                                        thích</a></li>

                                <li class="sh__nav-list__item py-12">
                                    <a href="<?php echo e(url('tim-ban')); ?>"
                                       class="btn ht-btn-secondary d-iblock fw-500 btn-thicken-border">Tìm bạn ở
                                        ghép</a>
                                </li>

                                <li class="sh__nav-list__item">
                                    <a href="<?php echo e(url('notification')); ?>" class="single-item single-item--notify">
                                        <span class="notify-icon"><i class="ion-ios-bell"></i></span>
                                        <span class="notify-label">Thông báo</span>
                                        <span class="notifi-count" id="ntf-mobile-cnt">0</span>
                                    </a>
                                </li>
                                <li class="sh__nav-list__item">
                                    <a href="#" class="single-item single-item--notify">
                                        <span class="notify-icon"><i class="ion-chatbubbles"></i></span>
                                        <span class="notify-label">Tin nhắn</span>
                                        <span class="notifi-count" id="ntf-msg-mobile-cnt">0</span>
                                    </a>
                                </li>
                                <li class="sh__nav-list__item">
                                    <a href="#" class="single-item single-item--user">
                                        <span class="user-avatar"><img style="border: 2px solid #ff5722"
                                                                       src="<?php echo e(auth('backend')->user()->image); ?>"
                                                                       alt=""></span>
                                        <span class="user-title"><?php echo e(auth('backend')->user()->name_text_text); ?></span>
                                        <span class="user-dropdown-icon ion-ios-arrow-down"></span>
                                    </a>
                                    <ul class="sh__inner-list mt--4">
                                        <li class="sh__inner-list__item"><a href="<?php echo e(url('profile')); ?>"
                                                                            class="single-inner-item single-inner-item--text">Thông
                                                tin cá nhân</a></li>
                                        <li class="sh__inner-list__item"><a href="#"
                                                                            class="single-inner-item single-inner-item--text">Hướng
                                                dẫn &amp; Trợ giúp</a></li>
                                        <li class="sh__inner-list__item"><a href="<?php echo e(url('logout')); ?>"
                                                                            class="single-inner-item single-inner-item--text">Đăng
                                                xuất</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                        <!-- END mobile nav -->

                    </div>
                <?php endif; ?>
            </div>
        </div>
    </header>

    <!-- END site header -->

    <!-- site content -->
    <div id="siteContent" class="site-content">
        <?php if(session()->has('error')): ?>
            <div class="alert alert-danger flash-message"><?php echo e(session()->get('error')); ?></div>
        <?php endif; ?>
        <?php if(session()->has('success')): ?>
            <div class="alert alert-success flash-message"><?php echo session()->get('success'); ?></div>
        <?php endif; ?>
        <?php if(isset($errors) && count($errors) > 0): ?>
            <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; ?>
        <?php echo $__env->yieldContent('content'); ?>
    </div>
    <!-- END site content -->

    <!-- site footer -->
    
        
            
                
                    
                        
                            
                                
                                
                                                                                                
                                        
                                
                                            
                                
                                                                                                       
                                                                                                       
                                        
                                        
                                
                            
                        
                        
                            
                                
                                
                                    
                                    
                                    
                                    
                                
                            
                        
                        
                            
                                
                                
                                    
                                            
                                            
                                
                            
                        
                    

                
            
            
                
                    
                        
                            
                            
                            
                            
                            
                            
                            
                        
                    
                    
                
            

        

<!-- END site footer -->

</div>

<button id="backToTop" class="back-to-top-btn"><i class="ion-android-arrow-up"></i></button>


<!-- JS: Libs -->

<script src="/frontend3/assets/libs/jquery.min.js"></script>
<script src="/frontend3/assets/libs/bootstrap/js/bootstrap.js"></script>
<script src="/frontend3/assets/libs/select2/js/select2.full.min.js"></script>
<script src="/frontend3/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="/frontend3/assets/libs/bootstrap-touchspin/jquery.bootstrap-touchspin.min.js"></script>
<script src="/frontend3/assets/libs/fancybox/jquery.fancybox.min.js"></script>
<script src="/frontend3/assets/libs/slick/slick.min.js"></script>
<script src="/frontend3/assets/libs/autosize/autosize.min.js"></script>
<script src="/frontend3/assets/libs/sticky-sidebar.min.js"></script>
<script src="/frontend3/assets/libs/smooth-scroll/smooth-scroll.min.js"></script>


<script src="/frontend3/assets/libs/wNumb.js"></script>
<script src="/frontend3/assets/libs/noUiSlider/nouislider.min.js"></script>
<script src="/frontend3/assets/js/jquery.toast.min.js"></script>
<script src="/frontend3/assets/js/select2.vi.min.js"></script>
<script src="/js/jquery.validate.min.js"></script>

<!-- JS: Main -->
<script src="https://sdk.accountkit.com/vi_VN/sdk.js"></script>
<script src="/frontend3/assets/js/smartbanner.min.js"></script>
<script>

    var baseUrl = '<?php echo e(url('/')); ?>';
    $.ajaxSetup({
        headers: {'X-CSRF-Token': '<?php echo e(csrf_token()); ?>'}
    });

    $.fn.select2.defaults.set('language', 'vi');


</script>
<!-- custom JS -->
<script>

    function readURL(input) {
        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function (e) {
                $('#register-image').attr('src', e.target.result);
            }

            reader.readAsDataURL(input.files[0]);
        }
    }

    $("#image-input").change(function () {
        readURL(this);
    });

    $('.date-picker').datepicker({
        format: 'dd/mm/yyyy',
        autoclose: true,
    });

    $(".sign-up-form").validate(
        {
            rules: {
                password: "required",
                confirm_password: {
                    equalTo: "#password"
                },
                phone: {
                    required: true,
                    remote: {
                        url: "<?php echo e(url('admin/check-unique-phone')); ?>",
                        type: "post",
                        data: {
                            phone: function() {
                                return $( "#phone" ).val();
                            }
                        }
                    }
                },
                email: {
                    required: true,
                    email: true,
                    remote: {
                        url: "<?php echo e(url('admin/check-unique-email')); ?>",
                        type: "post",
                        data: {
                            email: function() {
                                return $( "#email" ).val();
                            }
                        }
                    }
                }
            },
            submitHandler: function (form) {
                var fileName = $('input[name="image"]').val();
                if (!fileName) {
                    $('input[name="is_valid]').val(0);
                    alert('Không được bỏ trống ảnh');
                    return false;
                }

                form.submit();


            },
            messages: {
                first_name: "Vui lòng không bỏ trống Họ",
                last_name: "Vui lòng không bỏ trống Tên",
                gender: "Vui lòng không bỏ trống Giới tính",
                phone: {
                    required: "Vui lòng không bỏ trống số điện thoại",
                    remote: jQuery.validator.format("{0} đã được sử dụng")
                },
                email: {
                    required: "Vui lòng không bỏ trống Email",
                    remote: jQuery.validator.format("{0} đã được sử dụng")
                },
                type: "Vui lòng không bỏ trống loại tài khoản",
                password: "Vui lòng không bỏ trống mật khẩu",
                //    confirm_password: "Vui lòng không bỏ trống loại tài khoản",
                confirm_password: {
                    required: "Vui lòng nhập lại mật khẩu",
                    equalTo: "Vui lòng nhập lại chính xác mật khẩu"
                },
                // image: 'Vui lòng không bỏ trống hình ảnh'
            }
        }
    );

    //    $('.sign-up-form').submit(function (e) {
    //
    //        if ($('input[name="is_valid"]').val() == 0) {
    //
    //            e.preventDefault();
    //        }
    //        var password = $('input[name="password"]').val();
    //        var confirm_password = $('input[name="confirm_password"]').val();
    //        if (password != confirm_password) {
    //            $('input[name="is_valid"]').val(0);
    //            alert('Mật khẩu và mật khẩu nhập lại phải giống nhau');
    //            return;
    //        }
    //
    //        var fileName = $('input[name="image"]').val();
    //        if (!fileName) {
    //            $('input[name="is_valid]').val(0);
    //            alert('Không được bỏ trống ảnh');
    //            return;
    //        }
    //
    //        $('input[name="is_valid"]').val(1);
    //
    //    });

    $(document).on('click', '.single-action--like', function (e) {
        e.preventDefault();

        <?php if(!auth('backend')->check()): ?>

                $('#modal__sign-in').modal('show');
        $('#subtitle-sign-in').text('Bạn cần đăng nhập để thực hiện chức năng này');
        return;

                <?php endif; ?>

        var hostel_id = $(this).attr('data-hostel-id');
        var that = this;
        $.ajax({

            url: '<?php echo e(url('wishlist/add')); ?>',
            data: {
                hostel_id: hostel_id
            },
            dataType: 'json',
            type: 'post',
            success: function (response) {
                if (response.status == 3) {
                    $('#modal__sign-in').modal('show');
                    $('#subtitle-sign-in').text('Bạn cần đăng nhập để thực hiện chức năng này');
                }

                if (response.status == 1) {
                    if (response.data == true) {
                        $(that).addClass('active');
                    } else {
                        $(that).removeClass('active');
                        <?php if(str_contains(request()->fullUrl(), 'wishlist')): ?>

                            $.ajax({
                            url: '<?php echo e(url('wishlist')); ?>',
                            type: 'get',
                            dataType: 'json',
                            success: function (response) {
                                $('.list-wishlist').html(response.html);
                            }
                        });

                        <?php endif; ?>
                    }
                }
            }

        });
    });

    $(document).on('click', '#btn-register', function () {
        $('#modal__sign-in').modal('hide');
        $('#modal__sign-up').modal('show');
    });

    $(document).on('click', '#btn-signup', function () {
        $('#modal__sign-in').modal('show');
        $('#modal__sign-up').modal('hide');
    });

    $(document).on('change', '#province1', function (e) {
        $.ajax({
            url: '<?php echo e(url('get-sub-location')); ?>',
            type: 'get',
            data: {
                'id': $(this).val(),
                'type': 'province',
            },
            dataType: 'html',
            success: function (response) {
                $('#district1').html(response);
                $('#ward1').html('');

            }
        });
    });

    $(document).on('change', '#district1', function (e) {
        $.ajax({
            url: '<?php echo e(url('get-sub-location')); ?>',
            type: 'get',
            data: {
                'id': $(this).val(),
                'type': 'district'
            },
            dataType: 'html',
            success: function (response) {
                $('#ward1').html(response);

            }
        });
    });

</script>
<script>

    var page = 1;

    $(document).ready(function () {
        $('input:checkbox:checked').parent().find('svg').css({
            fill: '#FF5722'
        });


        <?php if(auth('backend')->check()): ?>

            $.ajax({
            url: '<?php echo e(url('notification-home')); ?>',
            success: function (response) {
                if (parseInt(response.count) == 0) {
                    $('#ntf-count').hide();
                    $('#ntf-mobile-cnt').hide();
                } else {
                    $('#ntf-count').show();
                    $('#ntf-mobile-cnt').show();
                    $('#ntf-count').text(response.count);
                    $('#ntf-mobile-cnt').text(response.count);

                }
                $('#notify-list').append(response.html);
            }
        });

        $.ajax({
            url: '<?php echo e(url('notification-message')); ?>',
            success: function (response) {
                if (parseInt(response.count) == 0) {
                    $('#ntf-msg-count').hide();
                    $('#ntf-msg-mobile-cnt').hide();
                } else {
                    $('#ntf-msg-count').show();
                    $('#ntf-msg-mobile-cnt').show();
                    $('#ntf-msg-count').text(response.count);
                    $('#ntf-msg-mobile-cnt').text(response.count);

                }
                $('#notify-msg-list').append(response.html);
            }
        });

        $('#notify-list').scroll(function () {
            if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
                var that = this;
                page++;
                $.ajax({
                    url: '<?php echo e(url('notification-home')); ?>',
                    type: 'get',
                    beforeSend: function () {
                        $('#notification-home-loading').remove();
                        $(that).append('<li class="ht-loading" id="notification-home-loading"></li>');
                    },
                    data: {
                        page: page
                    },
                    dataType: 'json',
                    success: function (response) {
                        if (parseInt(response.count) == 0) {
                            $('#ntf-count').hide();
                        } else {
                            $('#ntf-count').text(response.count);
                        }
                        $('#notify-list').append(response.html);
                        $('#notification-home-loading').remove();
                    }
                });

            }
        });

        $('#notify-msg-list').scroll(function () {
            if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
                var that = this;
                page++;
                $.ajax({
                    url: '<?php echo e(url('notification-message')); ?>',
                    type: 'get',
                    beforeSend: function () {
                        $('#notification-msg-home-loading').remove();
                        $(that).append('<li class="ht-loading" id="notification-msg-home-loading"></li>');
                    },
                    data: {
                        page: page
                    },
                    dataType: 'json',
                    success: function (response) {
                        if (parseInt(response.count) == 0) {
                            $('#ntf-msg-count').hide();
                        } else {
                            $('#ntf-msg-count').text(response.count);
                        }
                        $('#notify-msg-list').append(response.html);
                        $('#notification-msg-home-loading').remove();
                    }
                });

            }
        });

        <?php endif; ?>

setTimeout(function () {
            $('.flash-message').hide();
        }, 3500);

        $('input:checkbox').click(function () {
            if ($(this).is(':checked')) {
                $(this).parent().css({
                    color: '#FF5722'
                });
                $(this).parent().find('svg').css({
                    fill: '#FF5722'
                });
            } else {
                $(this).parent().css({
                    color: 'black'
                });
                $(this).parent().find('svg').css({
                    fill: 'black'
                });
            }
        });

        $('input:checkbox:checked').parent().css({
            color: '#FF5722'
        });


        $collapseFilterBtn = $('#collapsePropertyFilters-toggle');
        function collapseFiltersBtnChangeHTML() {
            if ($('#collapsePropertyFilters-toggle').hasClass('collapsed')) {
                $('#collapsePropertyFilters-toggle').html('Thêm bộ lọc');
            } else {
                $('#collapsePropertyFilters-toggle').html('Thu gọn');
            }
        }

        collapseFiltersBtnChangeHTML();
        $collapseFilterBtn.click(function (e) {
            e.preventDefault();
            if ($(this).hasClass('collapsed')) {
                $(this).html('Thu gọn');
            } else {
                $(this).html('Thêm bộ lọc');
            }
        });

    });

    $(document).on('click', '.single-noti-home', function () {
        var id = $(this).attr('data-id');
        var that = this;
        $.ajax({
            url: '<?php echo e(url('read-notification')); ?>',
            type: 'post',
            data: {
                id: id
            },
            dataType: 'json',
            success: function (response) {
                if (response.status == 1) {
                    var number = $('#ntf-count').text();
                    number = parseInt(number);
                    $('#ntf-count').text(number - 1);
                    $(that).css({
                        'background-color': 'white'
                    });
                }
            }
        });
    });


</script>

<?php echo $__env->make('quanlynhatro.partials.new_registration_modal', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->yieldPushContent('scripts'); ?>
</body>
</html>
