<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="csrf-token" content="{{ csrf_token() }}">

        <title>{{ config('app.name', 'HSE') }}</title>

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.gstatic.com">
        <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap" rel="stylesheet">
        <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('img/frontend/favicon/apple-touch-icon.png') }}">
        <link rel="icon" type="image/png" sizes="32x32" href="{{ asset('img/frontend/favicon//favicon-32x32.png') }}">
        <link rel="icon" type="image/png" sizes="16x16" href="{{ asset('img/frontend/favicon//favicon-16x16.png') }}">
        <link rel="manifest" href="{{ asset('img/frontend/favicon/site.webmanifest') }}">

        <!-- Styles -->
        <link rel="stylesheet" href="{{ asset('css/app.css') }}">
    
        <link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap-md.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('css/all.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('css/style.css?v=3') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('css/aos.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('css/sweetalert.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('css/colorbox.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('css/jqueryui.css') }}">
        <link rel="stylesheet" href="{{ asset('css/frontend/bootstrap-daterangepicker.css') }}">
        <link rel="stylesheet" href="{{ asset('css/frontend/datepicker3.css') }}">


        <!-- Scripts -->
        <script src="{{ asset('js/app.js') }}" defer></script>
        <!-- jQuery -->
        <script src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
        <script src="{{ asset('js/frontend/moment.min.js') }}"></script>
        <script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
        <script type="text/javascript" src="{{ asset('js/jquery-validate.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/all.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/aos.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/frontend/bootstrap-daterangepicker.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/sweetalert.min.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/jquery.colorbox.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/jquery-ui.js') }}"></script>
       <script src="{{ asset('js/frontend/bootstrap-datepicker.js') }}"></script>
        <script type="text/javascript">
            $.ajaxSetup({
                headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
            });
        </script>           
    </head>
    <body class="font-sans antialiased">
        <?php 
            $Corefunctions = new \App\customclasses\Corefunctions; 
            $pendingcount = $Corefunctions->pendingCount();
        ?>
        <div class="min-h-screen bg-gray-100">
            @include('layouts.navigation')

            <!-- Page Heading -->
            {{-- <header class="bg-white shadow">
                <div class="row">
                    <div class="col-12">
                        {{ $header }}
                    </div>
                </div>
            </header> --}}
            @section('sidebar')
            <div class="main-menu">
                <div class="main-menu-content">
                    <ul class="navigation navigation-main" id="main-menu-navigation">
                    <li class=" nav-item @if($headerdata['lefttitle'] == 'admins') active @endif"><a href="{{ url('admins/list/Active') }}"><i class="fas fa-user-tie"></i><span class="menu-title" data-i18n="">Admins</span></a>
                    </li>
                    <li class=" nav-item @if($headerdata['lefttitle'] == 'users') active @endif"><a href="{{ url('users/list/Active') }}"><i class="fas fa-user"></i><span class="menu-title" data-i18n="">Users</span></a>
                    </li>
                    <li class=" nav-item has-submenu"><a class="submenu-tag" href="#"><i class='fas fa-database'></i><span class="menu-title" data-i18n="">Data Repository</span></a>
                        <ul class="@if($headerdata['lefttitle'] == 'datarepositorycategories' || $headerdata['lefttitle'] == 'datarepositories') active @endif">
                        <li class="@if($headerdata['lefttitle'] == 'datarepositorycategories') active @endif"><a href="{{ url('datarepositories/categories/list/Active') }}">Categories</a></li>
                        <li class="@if($headerdata['lefttitle'] == 'datarepositories') active @endif"><a href="{{ url('/datarepositories/list/Published') }}">Data Repositories</a></li>
                    </ul></li>
                    </li>
                    <li class=" nav-item has-submenu"><a class="submenu-tag" href="#"><i class="fas fa-link"></i><span class="menu-title" data-i18n="">Quick Links</span></a>
                
                    <ul class="@if($headerdata['lefttitle'] == 'quicklinkcategories' || $headerdata['lefttitle'] == 'quicklinks') active @endif">
                        <li class="@if($headerdata['lefttitle'] == 'quicklinkcategories') active @endif"><a href="{{ url('quicklinkcategories/list/Active') }}">Categories</a></li>
                        <li class="@if($headerdata['lefttitle'] == 'quicklinks') active @endif"><a href="{{ url('quicklinks/list/Published') }}">Quick Links</a></li>
                    </ul></li>
                    <li class=" nav-item @if($headerdata['lefttitle'] == 'news') active @endif"><a href="{{ url('news/list/Published') }}"><i class='fas fa-newspaper'></i><span class="menu-title" data-i18n="">News and Development</span></a></li>
                    @if(ENVIRONMENT == 'Development')
                    @if(Auth::user()->role_id == '1')
                    <li class=" nav-item has-submenu"><a class="submenu-tag" href="#"><i class='fas fa-file-alt'></i><span class="menu-title" data-i18n="">Reports</span></a>
                    <ul class="@if($headerdata['lefttitle'] == 'contentaccessreports') active @endif">
                        <li class="@if($headerdata['lefttitle'] == 'contentaccessreports') active @endif"><a href="{{url('reports/contentaccess')}}">Content Access Report</a></li>
                        <li class="f"><a href="{{url('userspecificreports')}}">User Specific Download Report</a></li>
                    </ul></li>   
                    </li>
                    @endif
                    @if(Auth::user()->role_id != '3')
                    <li class=" nav-item @if($headerdata['lefttitle'] == 'requests') active @endif"><a href="{{ url('requestaccesslist') }}"><i class='fas fa-file-import'></i><p class="m-0 d-inline menuP1" data-i18n="">Access Requests</p>@if($pendingcount!=0)<p class=" menuP2 m-0 d-inline">{{$pendingcount}}</p>@endif</a>
                    </li>
                    @endif
                    @endif
                    @if(Auth::user()->role_id != '3')
                    <li class=" nav-item @if($headerdata['lefttitle'] == 'inquiries') active @endif"><a href="{{ url('inquiries') }}"><i class='fas fa-envelope-open-text'></i></i><span class="menu-title" data-i18n="">Inquiries</span></a>
                    </li>
                    @endif
                    <!-- <li class=" nav-item @if($headerdata['lefttitle'] == 'profile') active @endif"><a href="{{ url('myprofile') }}"><i class="fas fa-user"></i><span class="menu-title" data-i18n="">My Profile</span></a>
                    </li> -->
                </div>
            </div>
            @show

            <!-- Page Content -->
            <main class="header-space">
                {{ $slot }}
            </main>
        </div>
        <script>
$(document).ready(function(){
$('.submenu-tag').on("click", function(e){
$(this).siblings('ul').toggle();
e.stopPropagation();
e.preventDefault();
});
});
</script>
    </body>
</html>
