{% extends "base.html.twig" %}

{% block title %}
    {{ 'admin.title'|trans }}
{% endblock %}

{% block body %}
    <div class="row">
        <div class="col-md-2 col-lg-3">
            <aside class="mb-3">
                <div class="list-group mb-4">
                    <li class="list-group-item disabled text-body-tertiary" aria-disabled="true">
                        <i class="fa fa-cogs me-2"></i>
                        {{ 'admin.menu.system'|trans }}
                    </li>
                    <a href="{{ path('admin_index') }}" class="list-group-item {% if tab == 'index' %}active{% endif %}">
                        {{ 'admin.menu.general'|trans }}
                    </a>

                    <a href="{{ path('admin_dados') }}" class="list-group-item {% if tab == 'dados' %}active{% endif %}">
                        {{ 'admin.menu.data'|trans }}
                    </a>

                    <a href="{{ path('admin_modulos_index') }}" class="list-group-item {% if tab == 'modulos' %}active{% endif %}">
                        {{ 'admin.menu.modules'|trans }}
                    </a>
                </div>

                <div class="list-group mb-4">
                    <li class="list-group-item disabled text-body-tertiary" aria-disabled="true">
                        <i class="fa fa-database me-2"></i>
                        {{ 'admin.menu.master_data'|trans }}
                    </li>
                    <a href="{{ path('admin_unidades_index') }}" class="list-group-item {% if tab == 'unidades' %}active{% endif %}">
                        {{ 'admin.menu.unities'|trans }}
                    </a>

                    <a href="{{ path('admin_departamentos_index') }}" class="list-group-item {% if tab == 'departamentos' %}active{% endif %}">
                        {{ 'admin.menu.departments'|trans }}
                    </a>

                    <a href="{{ path('admin_servicos_index') }}" class="list-group-item {% if tab == 'servicos' %}active{% endif %}">
                        {{ 'admin.menu.services'|trans }}
                    </a>

                    <a href="{{ path('admin_perfis_index') }}" class="list-group-item {% if tab == 'perfis' %}active{% endif %}">
                        {{ 'admin.menu.roles'|trans }}
                    </a>

                    <a href="{{ path('admin_prioridades_index') }}" class="list-group-item {% if tab == 'prioridades' %}active{% endif %}">
                        {{ 'admin.menu.priorities'|trans }}
                    </a>

                    <a href="{{ path('admin_locais_index') }}" class="list-group-item {% if tab == 'locais' %}active{% endif %}">
                        {{ 'admin.menu.places'|trans }}
                    </a>
                </div>
                <div class="list-group mb-4">
                    <li class="list-group-item disabled text-body-tertiary" aria-disabled="true">
                        <i class="fa fa-plug me-2"></i>
                        {{ 'admin.menu.integrations'|trans }}
                    </li>

                    <a href="{{ path('admin_api_index') }}" class="list-group-item {% if tab == 'api' %}active{% endif %}">
                        {{ 'admin.menu.webapi'|trans }}
                    </a>

                    <a href="{{ path('admin_webhooks_index') }}" class="list-group-item {% if tab == 'webhook' %}active{% endif %}">
                        {{ 'admin.menu.webhook'|trans }}
                    </a>
                </div>
            </aside>
        </div>
        <div class="col-md-10 col-lg-9">
            {% block adminContent %}{% endblock %}
        </div>
    </div>
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <style>
        body>section {
            padding: 20px 0;
        }
    </style>
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script type="text/javascript" src="{{ asset("js/admin.js") }}"></script>
{% endblock %}
