{% if this.infoPanel() is not empty %}
   {% set infoPanelData = this.decodeJson(this.infoPanel.data|default('{}')) %}
   <aside {{ attributes.defaults(stimulus_controller(this.shortName)).defaults({
      class: 'c-infopanel-' ~ infoPanelData.color|default('default'),
      'data-infopanel': this.infoPanel.page_id,
      'data-version': this.infoPanel.version,
   }) }}
         aria-label="{{ 'infopanel.label'|trans([], 'others') }}">
      {{ this.infoPanel.body|raw }}
      {% if this.infoPanel.always_visible|default(null) != 'Y' %}
         <button type="button" data-close
                 aria-label="{{ 'infopanel.close'|trans([], 'others') }}"
                 title="{{ 'infopanel.close'|trans([], 'others') }}">
            <twig:ux:icon name="close" class="c-icon"/>
         </button>
      {% endif %}
   </aside>
{% endif %}
