{#
/**
 * Copyright © 2003-2024 The Galette Team
 *
 * This file is part of Galette (https://galette.eu).
 *
 * Galette is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Galette is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
 */
#}
<div class="ui styled fluid accordion field">
    <div class="active title">
        <i class="jsonly displaynone icon dropdown" aria-hidden="true"></i>
        {{ _T("Groups:") }}
    </div>

    {% set group_list_values = {(0): _T("Select a group")} %}
    {% for group in groups %}
        {% set group_list_values = group_list_values + {(group.getId()): group.getIndentName()} %}
    {% endfor %}

    <div class="active content field">
        {% include "components/forms/select.html.twig" with {
            name: 'group_to_add',
            id: 'group_to_add',
            label: _T("Add to group"),
            title: _T("Select a group to add selected members to"),
            compile_id: "input_" ~ 'groups_to_add',
            masschange: true,
            value: null,
            values: group_list_values,
        } %}
    </div>
    <div class="active content field">
        {% include "components/forms/select.html.twig" with {
            name: 'group_to_remove',
            id: 'group_to_remove',
            label: _T("Remove from group"),
            title: _T("Select a group to remove selected members from"),
            compile_id: "input_" ~ 'groups_to_remove',
            masschange: true,
            value: null,
            values: group_list_values,
        } %}
    </div>

</div>