{#
/**
 * @file
 * Block template from where to load the modals.
 *
 * See AltcomAjax::altcomAjaxAttrsString() for explanantion of vars.
 *
 * Available variables:
 * - element - The raw element containing data.
 *    - path - Current path where the block is displayed.
 */
#}
{{ attach_library('ui_patterns/tm_mnd_media_item.tm_mnd_media_item_lib') }}

{% set link_attributes = link_attributes|default(create_attribute())
  .setAttribute("href", download_url)
%}
{% if download_icon_title %}
  {% set link_attributes = link_attributes.setAttribute('title', download_icon_title) %}
{% endif %}

<div class="mnd media-item {{ type }}">
  {{ media }}
  {% if download_url %}
    <a {{ link_attributes.addClass('download no-link-icon') }}><i class="fas fa-download"></i></a>
  {% endif %}
</div>
