{#
/*
 * Copyright © ProgramCMS. All rights reserved.
 * See COPYING.txt for license details.
 *
 * Developed by Mohamed EL QUCHIRI <elquchiri@gmail.com>
 */
#}
<div class="config-menu" data-controller="config-menu">
    <ul>
        {% for tab in block.getTabs() %}
            <li class="root {% if block.isTabActive(tab) %}open{% endif %}">
                <a href="#">{{ tab.getLabel() }}</a>
            </li>
            {% if tab.hasChildren() %}
                <ul class="child" {% if block.isTabActive(tab) %}style="display: block"{% endif %}>
                    {% for section in tab.getChildren() %}
                        <li>
                            <a class="{% if block.isSectionActive(section) %}active{% endif %}"
                               href="{{ block.getSectionUrl(section) }}">
                                {{ section.getLabel() }}
                            </a>
                        </li>
                    {% endfor %}
                </ul>
            {% endif %}
        {% endfor %}
    </ul>
</div>