{#
  Copyright (C) 2020-2025 CERN.
  Copyright (C) 2020 Northwestern University.
  Copyright (C) 2021 New York University.

  Invenio RDM Records is free software; you can redistribute it and/or modify
  it under the terms of the MIT License; see LICENSE file for more details.
#}

{%- from "invenio_app_rdm/records/macros/detail.html" import show_add_descriptions %}

{% set description = metadata.get('description') %}
{% if description %}
  <section id="description" class="rel-mt-2 rich-input-content" aria-label="{{ _('Record description') }}">
    <h2 id="description-heading" class="sr-only">{{ _('Description') }}</h2>
    {# description data is being sanitized by marshmallow in the backend #}
    <div style="word-wrap: break-word;">
      {{ description | safe }}
    </div>
  </section>
{% endif %}

{{ show_add_descriptions(record.ui.additional_descriptions) if record.ui.additional_descriptions }}
