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

{% block content %}
    {% include 'components/breadcrumbs.html.twig' %}

    <article class="phpdocumentor-element -class">
        {{ include('components/enum-title.html.twig') }}
        {{ include('components/element-found-in.html.twig') }}
        {{ include('components/element-header.html.twig') }}

        {{ include('components/enum-cases.html.twig') }}
        {{ include('components/methods.html.twig') }}
        {{ include('components/source-modal.html.twig') }}
    </article>
{% endblock %}

{% block on_this_page %}
    {% set cases = cases(node) %}
    {% set methods = methods(node) %}

    <section class="phpdocumentor-on-this-page__content">
        <strong class="phpdocumentor-on-this-page__title">On this page</strong>

        <ul class="phpdocumentor-list -clean">
            <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
            <li>
                <ul class="phpdocumentor-list -clean">
                    {% if cases is not empty %}
                        <li><a href="{{ link(node) }}#toc-cases">Cases</a></li>
                    {% endif %}
                    {% if methods is not empty %}
                        <li><a href="{{ link(node) }}#toc-methods">Methods</a></li>
                    {% endif %}
                </ul>
            </li>
            {% if cases is not empty %}
                <li class="phpdocumentor-on-this-page-section__title">Cases</li>
                <li>
                    <ul class="phpdocumentor-list -clean">
                        {% for case in cases %}
                            <li class="{% if case.deprecated %}-deprecated{% endif %}"><a href="{{ link(case) }}">{{ case.name }}</a></li>
                        {% endfor %}
                    </ul>
                </li>
            {% endif %}

            {% if methods is not empty %}
                <li class="phpdocumentor-on-this-page-section__title">Methods</li>
                <li>
                    <ul class="phpdocumentor-list -clean">
                        {% for method in methods|sortByVisibility %}
                            <li class="{% if method.deprecated %}-deprecated{% endif %}"><a href="{{ link(method) }}">{{ method.name }}()</a></li>
                        {% endfor %}
                    </ul>
                </li>
            {% endif %}
        </ul>
    </section>
{% endblock %}
