{% set labels = labels|default %}
<div class="dropdown multi-select js-multi-select form-group mb-0 js-multiple-select-dropdown
{{ mobileOnlyCheckboxes|default(false) ? 'multi-select--mobile-only-checkboxes' : '' }} {{ className|default('') }}"
data-multi-select-submit-on-hide="false">
<div class="mb-md-1 mb-4">
<div class="form-label mb-2">
{{ formLabel|default('form label') }}
</div>
{# achtung: wird nur mobil angezeigt #}
{% if sublabel|default('form label') %}
<div class="multi-select__sub-label d-md-none">
{{ sublabel }}
</div>
{% endif %}
</div>
<button class="form-control multi-select__button {{ labels ? 'has-value' : '' }} {{ mobileOnlyCheckboxes|default ? 'd-none d-md-block' : '' }}"
type="button" id="multipleSelectsDropdown-{{ id|default('multi-select-id') }}"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="multi-select__label">{{ buttonLabel|default('Button Label') }}</span>
<span class="multi-select__values">
{% if labels %}
{{ labels|join(', ')|default(buttonLabel|default(null)) }}
{% endif %}
</span>
<span class="multi-select__icon icon icon-chevron-down" aria-label="Arrow down"></span>
</button>
<div class="dropdown-menu js-multi-select__menu multi-select__menu js-dropdown-persist {{ mobileOnlyCheckboxes|default(false) ? 'dropdown-menu--show-mobile' : '' }}"
aria-labelledby="multipleSelectsDropdown-{{ id|default('multi-select-id') }}">
<ul class="list-unstyled custom-scrollbar multi-select__list">
{% for option in options|default() %}
<li class="multi-select__item">
{{ include('includes/form/multi-select-checkbox.html.twig', {
'id': option.id,
'name': option.name,
'value': option.value,
'checked': option.checked|default() ? 'checked' : '',
'required': false,
'label' : option.label|default(),
'inputModifier': 'js-multi-select__input',
}, with_context = false) }}
</li>
{% endfor %}
</ul>
<button type="submit" class="btn btn-dark w-100 multi-select__submit-btn {{ mobileOnlyCheckboxes|default(false) ? 'd-none d-md-block' : '' }}">
{{ 'form.filter'|trans }}
</button>
</div>
</div>