<!DOCTYPE html>
<html lang="<?php echo e(config('app.locale')); ?>">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

    <title><?php echo e(config('app.name', 'Laravel')); ?></title>

    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">

    <!-- Styles -->
    <link rel="stylesheet" href="<?php echo e(asset('css/bootstrap.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/bootstrap.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/app.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('css/mystyle.css')); ?>">

    <!-- Scripts -->
    <script type="text/javascript" src="<?php echo e(URL::asset('js/jquery-3.1.1.min.js')); ?>"></script>
    <script type="text/javascript" src="<?php echo e(URL::asset('js/bootstrap.min.js')); ?>"></script>
    <script type="text/javascript" src="<?php echo e(URL::asset('js/app.js')); ?>"></script>

</head>
<body>

<nav class="panel-primary navbar navbar-default navbar-static-top panel-primary">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="<?php echo e(url('/home')); ?>">
                <img alt="logo" class="logo_img" src=" <?php echo e(asset('images/znak_obce.jpg')); ?>">
            </a>
            <!-- Collapsed Hamburger -->
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
                <span class="sr-only">Toggle Navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <!-- Branding Image -->
            <a class="navbar-brand" href="<?php echo e(url('/home')); ?>">
                <?php echo e(config('app.name', 'Laravel')); ?>

            </a>
        </div>

        <div class="collapse navbar-collapse" id="app-navbar-collapse">
            <!-- Left Side Of Navbar -->
            <ul class="nav navbar-nav">
                <li><a href="<?php echo e(url('/filtering')); ?>">Vyhledávání</a></li>
                <li><a href="<?php echo e(url('/more_info')); ?>">Kam zajít v okolí</a></li>
                <?php if(Auth::check()): ?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Nastavení účtu<span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo e(url('/change_password')); ?>">Změna hesla</a></li>
                            <li><a href="<?php echo e(url('/change_email')); ?>">Změna e-mailu</a></li>
                            <li><a href="<?php echo e(url('/delete_account')); ?>">Zrušení účtu</a></li>
                        </ul>
                    </li>
                    <?php if(Auth::user()->role == 'acco_admin'): ?>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Správa ubytování<span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="<?php echo e(url('/edit_acco')); ?>">Ubytování</a></li>
                                <?php if(Auth::user()->accommodation_id != null): ?>
                                    <li><a href="<?php echo e(url('/edit_rooms')); ?>">Pokoje</a></li>
                                    <li><a href="<?php echo e(url('/reservations_list')); ?>">Rezervace</a></li>
                                    <li><a href="<?php echo e(url('/customers_list')); ?>">Zákazníci</a></li>
                                    <?php if($accommodation <> null): ?>
                                        <li><a href="<?php echo e(url('reviews_list/' . $accommodation->accommodation_id)); ?>">Recenze</a></li>
                                    <?php endif; ?>
                                    <?php if(Auth::user()->owner == 'true'): ?>
                                        <li><a href="<?php echo e(url('acco_admin_list/')); ?>">Správci ubytování</a></li>
                                    <?php endif; ?>
                                <?php endif; ?>
                            </ul>
                        </li>
                    <?php elseif(Auth::user()->role == 'admin'): ?>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Možnosti správce<span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="<?php echo e(url('/acco_list')); ?>">Správa ubytování</a></li>
                                <li><a href="<?php echo e(route('register')); ?>">Vytvořit administrátora</a></li>
                            </ul>
                        </li>

                    <?php endif; ?>
                <?php endif; ?>

            </ul>

            <!-- Right Side Of Navbar -->
            <ul class="nav navbar-nav navbar-right">
                <!-- Authentication Links -->
                <?php if(Auth::guest()): ?>
                    <li><a href="<?php echo e(route('login')); ?>">Přihlásit</a></li>
                    <li><a href="<?php echo e(route('register')); ?>">Registrovat</a></li>
                <?php else: ?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                            <?php echo e(Auth::user()->name); ?> <?php echo e(Auth::user()->lname); ?> <span class="caret"></span>
                        </a>

                        <ul class="dropdown-menu" role="menu">
                            <li>
                                <a href="<?php echo e(route('logout')); ?>"
                                   onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                    Odhlásit
                                </a>
                                <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" style="display: none;">
                                    <?php echo e(csrf_field()); ?>

                                </form>
                            </li>
                        </ul>
                    </li>
                <?php endif; ?>

            </ul>
        </div>
    </div>
</nav>
<div class="centered">
        <div class="container-fluid">
            <div class="row">
                <div class="content">
                    <?php echo $__env->yieldContent('content'); ?>
                </div>
            </div>
        </div>
</div>


<!-- Scripts -->
<script src="<?php echo e(asset('js/app.js')); ?>"></script>
<script>
    $('div.alert').not('.alert-important').delay(6000).fadeOut(500);
</script>
</body>
</html>
