<head>
    <title>Kuvia @yield('title')</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/theme.css">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
    <link rel="stylesheet" href="/css/toastr.min.css">
</head>
<body>
<div class="wrapper">
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <a class="navbar-brand" href="#">Kuvia</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarColor02">
            @auth
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" href="/d">Dashboard</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/g">Gallery</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Settings</a>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a class="dropdown-item" href="/s/watermark">Watermark</a>
                        <a class="dropdown-item" href="/s/reports">Reports</a>
                        <a class="dropdown-item" href="/s/theme">Design</a>
                    </div>
                </li>
            </ul>
            @endauth
            <ul class="nav navbar-nav float-md-right">
                @auth
                    @if($user->typ == "admin")
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Admin</a>
                        <div class="dropdown-menu dropdown-menu-right">
                            <a class="dropdown-item" href="/a/themes">Themes</a>
                        </div>
                    </li>
                    @endif
                    <li class="nav-item active">
                        <a class="nav-link" href="/{{ $current_tenant->url }}"><i class="fas fa-external-link-alt"></i></a>
                    </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Tenant</a>
                    <div class="dropdown-menu dropdown-menu-right">
                        @foreach($user_tenants as $tenant)
                            <a class="dropdown-item" href="/t/select/{{ $tenant->url }}">{{ $tenant->name }}</a>
                        @endforeach
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/t/new">New Tenant</a>
                    </div>
                </li>
                @endauth
            </ul>


        </div>
    </nav>

    <div class="container-fluid" >
        @yield('content')
    </div>

</div>

<script src="/js/jquery-3.5.1.min.js"></script>
<script src="/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script src="/js/toastr.min.js"></script>
<script>
    toastr.options = {
        "positionClass": "toast-bottom-right",
    };
    //toastr.info('Are you the 6 fingered man?')
</script>
@yield('js')
</body>
