{% load static  %} {% load multitenancy_tags %}
{% load i18n %}
{% load saved_queries %}
{% load load_helpdesk_settings %}

{% with request|load_helpdesk_settings as helpdesk_settings %}
{% with user|saved_queries as user_saved_queries_ %}
<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        {% get_company_details as details %}
        <title>Dashboard | {{details.info.company_name}}</title>
        <!-- Tell the browser to be responsive to screen width -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- Font Awesome -->
        <link rel="stylesheet" href="{% static "plugins/fontawesome/css/all.min.css" %}">
        <!-- Ionicons -->
        <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
        <link href="{% static "dist/css/tabulator.min.css" %}" rel="stylesheet">

        <link rel="stylesheet" href="{% static "plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css"%}">
        <!-- Theme style -->
        <link rel="stylesheet" href="{% static "dist/css/adminlte.min.css" %}">
        
        {#% include 'helpdesk/base-head.html' %#}


        {%block custom_css%}
        {%endblock%}
        {% block helpdesk_head %}
        {% endblock %}
        <!-- Google Font: Source Sans Pro -->
        <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    </head>

    <body class="sidebar-mini bg-dark layout-fixed sidebar-collapse accent-navy  sidebar-closed" style="height: auto;">
        <div class="wrapper">

            <!-- Navbar -->
            <nav class="main-header navbar navbar-expand sticky-top navbar-dark navbar-navy">
                <!-- Left navbar links -->
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
                                class="fas fa-bars"></i></a>
                    </li>
                    <!--

                    <li class="nav-item d-none d-sm-inline-block">
                        <a href="#" class="nav-link">Contact</a>
                    </li>
                    -->
                </ul>

                <!-- SEARCH FORM -->
                <form class="form-inline ml-3">
                    <div class="input-group input-group-sm">
                        <input class="form-control form-control-navbar" type="search" placeholder="Search"
                            aria-label="Search">
                        <div class="input-group-append">
                            <button class="btn btn-navbar" type="submit">
                                <i class="fas fa-search"></i>
                            </button>
                        </div>
                    </div>
                </form>
                {#% include "multitenancy/admin/adminUser/includes/notifications.html" %#}
                <!-- Right navbar links -->
                
                {% include "multitenancy/admin/navbar.html" %}
                

               
            </nav>
            <!-- /.navbar -->
            {% if user.type == 'Admin' %}
                {% include "multitenancy/admin/adminUser/includes/sidebar_template.html" with user=user id=id%}
            {% elif user.type == 'Staff' %}
                {% include "multitenancy/admin/teamUser/includes/sidebar_template.html" with user=user id=id%}
            {% else %}
                {% include "multitenancy/admin/publicUser/includes/sidebar_template.html" with user=user id=id%}
            {%endif%}
            <!-- Content Wrapper. Contains page content -->
            <div class="content-wrapper">
                <!-- Content Header (Page header) -->
                <div class="content-header">
                    <div class="container-fluid">
                        <div class="row mb-2">
                            <div class="col-sm-6">
                                <h1 class="text-dark"> {% block page_title %}{% endblock page_title %} </h1>
                            </div><!-- /.col -->
                            <div class="col-sm-6">
                                <ol class="breadcrumb float-sm-right">
                                    
                                    {% if user.type == 'Admin' %}
                                    <li class="breadcrumb-item"> <a href="{% url "admin_dashboard" %}">Home</a></li>
                                    {% elif user.type == 'Staff' %}
                                    <li class="breadcrumb-item"> <a href="{% url "team_dashboard" %}">Home</a></li>
                                    {% else %}
                                    <li class="breadcrumb-item"> <a href="{% url "customer_dashboard" %}">Home</a></li>
                                    {%endif%}
                                    {%block breadcrumbs %} {%endblock%}
                                    
                                </ol>
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div><!-- /.container-fluid -->
                </div>
                <!-- /.content-header -->

                {% block main_content %}

                {% endblock main_content %}


            </div>
            <!-- /.content-wrapper -->
            {% include "multitenancy/admin/footer.html" %}

            <!-- Control Sidebar -->
            <aside class="control-sidebar control-sidebar-dark">
                <!-- Control sidebar content goes here -->
            </aside>
            <!-- /.control-sidebar -->
        </div>
        <!-- ./wrapper -->
        <!-- jQuery -->
     <script src="{% static "plugins/jquery/jquery.min.js" %}"></script>
     
     <!-- Bootstrap 4 -->
     <script src="{% static "plugins/bootstrap/js/bootstrap.bundle.min.js" %}"></script>
     <script type="text/javascript" src="{% static "dist/js/tabulator.min.js" %}"></script>
     <!-- SweetAlert2 -->
     {% load sweetify %}
    {% sweetify %}
     <script src="{% static "dist/js/adminlte.min.js" %}"></script>
     <script src="{% static "plugins/sweetalert2/sweetalert2.all.min.js" %}"></script>

         
         
            {% block custom_js %}
            {% endblock custom_js %}
    </body>

</html>
{% endwith %}
{% endwith %}
