{% if 'listloader' in configuration.components %}
<a href="{{ path('mapbender_manager_element_select', { 'slug': application.slug, 'region': region }) }}" class="iconAdd hover-highlight-effect addElement" title="{{'mb.wmc.list.add_wmc'|trans}} {{region}}"></a>
{% endif %}
{% if 'listloader' in configuration.components %}
<table class="tableCore">
    <thead>
        <tr>
            <th>{{ 'mb.wmc.list.id' | trans }}</th>
            <th class="type">{{ 'mb.wmc.list.title' | trans }}</th>
            <th class="type">{{ 'mb.wmc.list.description' | trans }}</th>
            <th class="iconColumn"></th>
        </tr>
    </thead>
    <tbody>
    {% if wmclist|length > 0 %}
      {% for wmc in wmclist %}
        <tr class="element" data-id="{{element.id}}" data-href="{{ path('mapbender_manager_element_weight', {'id': wmc.id})}}">
            <td class="titleColumn description">{{ wmc.id }}</td>
            <td class="typeColumn description">{{ wmc.title }}</td>
            <td class="typeColumn description">{{ wmc.description }}</td>
            <td class="iconColumn">
                <div class="checkWrapper left iconCheckbox hover-highlight-effect {% if wmc.public %}iconCheckboxActive{% endif %}" title="{{"mb.wmc.list.toggle"|trans}} {{wmc.title}}">
                    <input class="checkbox" data-href="{{ path('mapbender_manager_element_enable', { 'id': element.id })}}" data-id="{{ element.id }}" type="checkbox" {% if element.enabled %} checked="checked" {% endif %}>
                </div>
                <span class="iconEdit editElement hover-highlight-effect" title="{{"mb.wmc.list.wmc_element"|trans}}  {{wmc.title}}" data-url="{{ path('mapbender_manager_element_edit', {'slug': application.slug, 'id': wmc.id})}}"></span>
                <span class="iconRemove removeElement hover-highlight-effect" title="{{"mb.wmc.list.delete_wmc"|trans}} {{wmc.title}}" data-id="{{ wmc.id }}" data-slug="{{ application.slug }}" data-url="{{ path('mapbender_manager_element_confirmdelete', {'slug': application.slug, 'id': element.id}) }}"></span>
            </td>
        </tr>
      {% endfor %}
        <tr class="placeholderRow"></tr>
    {% else %}
        <tr>
            <td class="description">{{"mb.wmc.list.no_wmc"|trans}}</td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    {% endif %}
    </tbody>
</table>
{% endif %}
