{% load wagtailadmin_tags %}

<button type="button"
    class="{{ nav_icon_button_classes }}"
    aria-label="{{ toggle.aria_label }}"
    data-tippy-content="{{ panel.title }}"
    data-tippy-offset="[0,0]"
    data-tippy-placement="bottom"
    data-side-panel-toggle="{{ panel.name }}"
    aria-expanded="false"
>
    {% icon name=toggle.icon_name classname=nav_icon_classes %}
    {% if toggle.has_counter %}
        <div data-side-panel-toggle-counter class="{{ nav_icon_counter_classes }} {{ toggle.counter_classname|default:'w-bg-surface-button-default'}}" {% if not count %}hidden{% endif %}>
            {{ count }}
        </div>
    {% endif %}
</button>
