{% use "bootstrap_5_layout.html.twig" %}
{% block permissions_widget %}
    <div {{ block('widget_container_attributes') }}>
    {% for group_label, group in choices %}
        {%- if group is iterable -%}
        <div class="mt-2">
            <label class="mb-2"><b>{{ group_label|trans({}, translation_domain) }}</b></label>
            {% for key, choice in group %}
                <div>
                    {{- form_widget(form[key]) -}}
                    {{- form_label(form[key]) -}}
                </div>
            {% endfor %}
        </div>
        <hr>

        {%- endif -%}
    {% endfor %}
    </div>
{% endblock %}

{%- block form_widget_simple -%}    
    {%- set attr = attr | merge({class: (attr.class | default('') ~ ' form-control') | trim}) -%}
    {{ parent() }}
{%- endblock form_widget_simple -%}

{%- block search_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-search"></i></span>
        {{ block('form_widget_simple') }}
        <button class="btn btn-outline-secondary" type="submit">{% trans %}button_search{% endtrans %}</button>
    </div>
{%- endblock search_widget -%}

{%- block email_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-envelope-open-text"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock email_widget -%}

{%- block password_widget -%}
{%- set type = type | default('password') -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-lock"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock password_widget -%}

{%- block firstname_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-user"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock firstname_widget -%}

{%- block lastname_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="far fa-user"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock lastname_widget -%}

{%- block gender_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-transgender-alt"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock gender_widget -%}

{%- block height_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-ruler-combined"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock height_widget -%}

{%- block weight_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-weight"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock weight_widget -%}

{%- block phone_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-phone"></i></span>
        {{ block('form_widget_simple') }}
    </div>
{%- endblock phone_widget -%}

{%- block group_widget -%}
    <div class="input-group">
        <span class="input-group-text"><i class="fas fa-users"></i></span>
        {{ block('choice_widget') }}
    </div>
{%- endblock group_widget -%}

{%- block checkbox_widget -%}
<div class="form-check p-2">
    {{ parent() }}    
</div>
{%- endblock checkbox_widget -%}