{% from "macros/nswdesignsystem/_accortion_toggle_all.html" import toggle_all with context %} {% macro accordion(length_or_headers, with_toggle_all=false, toggle_all_labels=[]) %} {% if length_or_headers is iterable %} {% set headers = length_or_headers %} {% set length = headers | length %} {% else %} {% set headers = [] %} {% set length = length_or_headers %} {% endif %}