{% comment %} Reusable chip-style filter group. Drop this partial into any list/catalog page. Multiple groups can live in the same enclosing
; each one drives its own comma-separated hidden input. Required context: * name: string -- the group key. The hidden input MUST be present in the parent template as (kept in the parent so callers control its initial value). * label: string -- heading shown above the chips. * chips: iterable of {value, label, selected} dicts. Optional context: * empty_message: text shown when ``chips`` is empty (defaults to a generic placeholder via {{ empty_message|default:_("No options yet.") }}). The accompanying JS (static/src/chip-filters.js) toggles ``.filter-chip.active`` on click and re-emits the comma-separated value into the hidden input keyed by ``data-filter-csv``. Submitting the form sends the result; servers split on comma. No XHR -- keeps URLs bookmarkable. {% endcomment %} {% load i18n %}
{% if label %}

{{ label }}

{% endif %} {% if chips %}
{% for chip in chips %} {{ chip.label }} {% endfor %}
{% else %}

{{ empty_message|default:_("No options yet.") }}

{% endif %}