<!-- Table of contents item -->
<li class="md-nav__item">
    <a href="{{ toc_item.url }}" class="md-nav__link">
        <span class="md-ellipsis">
            {% if toc_item.title.startswith("[attribute] ") %}
                <code class="doc-symbol doc-symbol-attribute"></code>&nbsp;{{ toc_item.title | replace("[attribute] ", "") }}
            {% elif toc_item.title.startswith("[static-attribute] ") %}
                <code class="doc-symbol doc-symbol-static-attribute"></code>&nbsp;{{ toc_item.title | replace("[static-attribute] ", "") }}
            {% elif toc_item.title.startswith("[class] ") %}
                <code class="doc-symbol doc-symbol-class"></code>&nbsp;{{ toc_item.title | replace("[class] ", "") }}
            {% elif toc_item.title.startswith("[enum] ") %}
                <code class="doc-symbol doc-symbol-enum"></code>&nbsp;{{ toc_item.title | replace("[enum] ", "") }}
            {% elif toc_item.title.startswith("[variant] ") %}
                <code class="doc-symbol doc-symbol-variant"></code>&nbsp;{{ toc_item.title | replace("[variant] ", "") }}
            {% elif toc_item.title.startswith("[function] ") %}
                <code class="doc-symbol doc-symbol-function"></code>&nbsp;{{ toc_item.title | replace("[function] ", "") }}
            {% elif toc_item.title.startswith("[static-function] ") %}
                <code class="doc-symbol doc-symbol-static-function"></code>&nbsp;{{ toc_item.title | replace("[static-function] ", "") }}
            {% else %}
                {{ toc_item.title }}
            {% endif %}

        </span>
    </a>

    <!-- Table of contents list -->
    {% if toc_item.children %}
    <nav class="md-nav" aria-label="{{ toc_item.title | striptags }}">
        <ul class="md-nav__list">
            {% for toc_item in toc_item.children %}
            {% include "partials/toc-item.html" %}
            {% endfor %}
        </ul>
    </nav>
    {% endif %}
</li>
