<ul id="{{ id }}" class="mb-element mb-element-basesourceswitcher"  title="{{ configuration.tooltip|default(title)|trans }}">
{% if configuration.groups is defined %}
  {% for name, opts in configuration.groups %}
    {% if opts.type == 'item' %}
    <li class="basesourcesetswitch notgroup" {% if opts.active is defined and opts.active %}data-state="active"{% endif %} data-sourceset="{% for source in opts.sources %}{% if not loop.first %},{% endif %}{% spaceless %}{{- source -}}{% endspaceless %}{% endfor %}" >{{ opts.title | trans }}</li>
    {% else %}
    <li class="basesourcegroup" {% if opts.active is defined and opts.active %}data-state="active"{% endif %}>
      <!--span-->{{ name | trans }}<!--/span-->
      <ul class="basesourcesubswitcher hidden">
      {% for opt in opts.items %}
          <li class="basesourcesetswitch" {% if opt.active is defined and opts.active %}data-state="active"{%  endif %} data-sourceset="{% for source in opt.sources %}{% if not loop.first %},{% endif %}{% spaceless %}{{- source -}}{% endspaceless %}{% endfor %}" >{{ opt.title | trans }}</li>
      {% endfor %}
      </ul>
    </li>
    {% endif %}
  {% endfor %}
{% endif %}
</ul>