{% if chill_main_config.top_banner is defined and chill_main_config.top_banner.text is defined %}
    {% set banner_text = '' %}
    {% set current_locale = app.request.locale %}

    {% if chill_main_config.top_banner.text[current_locale] is defined %}
        {% set banner_text = chill_main_config.top_banner.text[current_locale] %}
    {% else %}
        {% set banner_text = chill_main_config.top_banner.text|first %}
    {% endif %}

    {% if banner_text %}
        <div class="top-banner w-100 text-center py-2"
             style="{% if chill_main_config.top_banner.color is defined %}color: {{ chill_main_config.top_banner.color }};{% endif %}{% if chill_main_config.top_banner.background_color is defined %}background-color: {{ chill_main_config.top_banner.background_color }};{% endif %}">
            {{ banner_text }}
        </div>
    {% endif %}
{% endif %}
