<?php
    $setting = App\Models\Setting::first();
    $languages = App\Models\Language::all();
?>

<?php echo $__env->make('admin.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<body>
    <div id="app">
        <div class="main-wrapper">
            <div class="navbar-bg"></div>
            <nav class="navbar navbar-expand-lg main-navbar">
                <div class="form-inline mr-auto">
                    <ul class="navbar-nav mr-3">
                        <li><a href="#" data-toggle="sidebar" class="nav-link nav-link-lg custom_click"><i
                                    class="fas fa-bars"></i></a></li>
                        <li><a href="#" data-toggle="search" class="nav-link nav-link-lg d-sm-none"><i
                                    class="fas fa-search"></i></a></li>
                    </ul>
                    <form id="setLanguageHeader" action="<?php echo e(route('set-language')); ?>">
                        <select class="dashboard_language" name="code">
                            <?php $__empty_1 = true; $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <option value="<?php echo e($language->code); ?>"
                                    <?php echo e(getSessionLanguage() == $language->code ? 'selected' : ''); ?>>
                                    <?php echo e($language->name); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <option value="en" <?php echo e(getSessionLanguage() == 'en' ? 'selected' : ''); ?>>English
                                </option>
                            <?php endif; ?>
                        </select>
                    </form>
                </div>
                <ul class="navbar-nav navbar-right">
                    <li class="dropdown dropdown-list-toggle"><a target="_blank" href="<?php echo e(route('home')); ?>"
                            class="nav-link nav-link-lg"><i class="fas fa-home"></i>
                            <?php echo e(__('admin.Visit Website')); ?></i></a>

                    </li>

                    <?php
                        $header_admin = Auth::guard('admin')->user();
                        $defaultProfile = App\Models\BannerImage::whereId('15')->first();
                    ?>
                    <li class="dropdown"><a href="#" data-toggle="dropdown"
                            class="nav-link dropdown-toggle nav-link-lg nav-link-user">
                            <?php if($header_admin->image): ?>
                                <img alt="image" src="<?php echo e(asset($header_admin->image)); ?>" class="rounded-circle mr-1">
                            <?php else: ?>
                                <img alt="image" src="<?php echo e(asset($defaultProfile->image)); ?>"
                                    class="rounded-circle mr-1">
                            <?php endif; ?>
                            <div class="d-sm-none d-lg-inline-block"><?php echo e($header_admin->name); ?></div>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right">

                            <a href="<?php echo e(route('admin.profile')); ?>" class="dropdown-item has-icon">
                                <i class="far fa-user"></i> <?php echo e(__('admin.Profile')); ?>

                            </a>
                            <div class="dropdown-divider"></div>
                            <a href="<?php echo e(route('admin.logout')); ?>" class="dropdown-item has-icon text-danger"
                                onclick="event.preventDefault(); document.getElementById('admin-logout-form').submit();">
                                <i class="fas fa-sign-out-alt"></i> <?php echo e(__('admin.Logout')); ?>

                            </a>
                            
                            <form id="admin-logout-form" action="<?php echo e(route('admin.logout')); ?>" method="POST"
                                class="d-none">
                                <?php echo csrf_field(); ?>
                            </form>
                            

                        </div>
                    </li>
                </ul>
            </nav>

            <?php echo $__env->make('admin.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

            <?php echo $__env->yieldContent('admin-content'); ?>

            <footer class="main-footer">
                <div class="footer-left">
                    <?php echo e($setting->copyright); ?>

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

    <?php echo $__env->make('admin.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH /home/fwvrhhfw/topriserealtors.com/resources/views/admin/master_layout.blade.php ENDPATH**/ ?>