{% set hasMoreDescriptions = moreDescriptions is defined and moreDescriptions | length > 0 %}
{% set hasLocalDescriptions = localDescriptions is defined and localDescriptions | length > 0 %}
{% if hasMoreDescriptions or hasLocalDescriptions %}
<section class="demi-event-detail-content-block demi-event-detail-content-block--contact">
<div class="container">
<div class="wysiwyg">
{% if hasMoreDescriptions %}
<h3 class="js-toc__title event__hl">{{ detailHeadline }}</h3>
<div class="">
{% for type in demi_core_eventGetSortedDescriptionTypes() | filter (type => type in moreDescriptions) %}
{% set tk = 'demi.event.detail.' ~ demi_getValidFileName(type) %}
<div class="my-4">
<h4 class="mb-2">
{{ tk | trans }}
</h4>
<div>
<div class="wysiwyg">{{ event.getDescription(type, app.request.getLocale()) | raw }}</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if hasLocalDescriptions %}
<div class="">
{% for description in localDescriptions %}
{% set tk = ('demi.event.detail.' ~ description.getProperty("demi_descriptionType")) | lower %}
<div class="my-4">
<h4 class="mb-2">
{{ tk | trans }}
</h4>
<div>
<div class="wysiwyg">{{ description.getText() | raw }}</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</section>
{% endif %}