{% set context = context ?? 'index' %}
{% set hyperlink = hyperlink ?? (context in ['index', 'embedded-index', 'pane']) %}
{% set returnUrl = returnUrl ?? null %}

{% apply spaceless %}
  {% for element in elements %}
    {% tag 'li' with {
      class: element.id in disabledElementIds ? 'disabled' : null,
      data: {
        id: element.id,
      },
    } %}
      {{ elementChip(element, {
        context: context ?? 'index',
        size: 'large',
        selectable: selectable,
        sortable: sortable,
        hyperlink,
        returnUrl,
      }) }}
    {% endtag %}
  {% endfor %}

{% endapply -%}
