{% sw_extends '@Parent/storefront/base.html.twig' %}
{% block base_header %}
{{ parent() }}
{% if context.customer != null and context.customer.group != null and context.customer.group.name == 'GC' %}
<div class="group-selection-popup-overlay">
<div class="group-selection-popup-container">
<form action="{{ path('frontend.account.group.change') }}">
<div class="group-selection-popup-header">
<div class="header-line">Anmeldeprofil auswählen</div>
<div class="group-selection-popup-header-text">
Du bist mehreren Profilen zugeordnet. Bitte wähle ein Profil aus, mit dem du dich im Shop
anmelden möchtest.
</div>
</div>
<div class="group-selection-popup-inner">
{% for group in context.customer.customFields['igm_groups'] %}
<div class="group-selection-item">
<label class="group-selection-label">
{% if loop.first %}
<input type="radio" id="group-selection-{{ group[0] }}" name="group-selection"
value="{{ group[0] }}" checked>
{% else %}
<input type="radio" id="group-selection-{{ group[0] }}" name="group-selection"
value="{{ group[0] }}">
{% endif %}
<i>{% if context.customer.customFields['igm_account_data']['gender'] == 'W' %}{{ group[1] }} {% else %} {{ group[2] }} {% endif %}</i>
</label>
</div>
{% endfor %}
</div>
<div class="group-selection-popup-buttons">
<a href="{{ path('frontend.account.logout.page') }}" class="logout-button">Abbrechen</a>
<button type="submit" class="accept-button">Auswählen</button>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}