{% load bread_tags %}

<footer class="bx--side-nav__footer">
        <button
            class="bx--side-nav__toggle"
            role="button"
            title="Close the side navigation menu"
            hx-post="{% url "preferences:user" %}"

            hx-include="#navigation-settings-form input"
            hx-select="body body" {# do not select anything #}
            hx-swap="afterbegin"
        >
            <div class="bx--side-nav__icon">
              {% carbon_icon "close" 20 class="bx--side-nav__icon--collapse bx--side-nav-collapse-icon" aria_hidden="true" %}
              {% carbon_icon "chevron--right" 20 class="bx--side-nav__icon--expand bx--side-nav-expand-icon" aria_hidden="true" %}
            </div>
            <span class="bx--assistive-text">
              Toggle the expansion state of the navigation
            </span>
        </button>
        <div id="navigation-settings-form" style="display: none">
            {% csrf_token %}
            <input
                type="checkbox"
                name="user_interface__navigation_menu_extended"
                id="id_user_interface__navigation_menu_extended"
                {% if not request.user.preferences.user_interface__navigation_menu_extended %}checked{% endif %}
            >
        </div>
</footer>
