{%
  set classes = [
  'media',
  'media--type-' ~ media.bundle()|clean_class,
  not media.isPublished() ? 'media--unpublished',
  view_mode ? 'media--view-mode-' ~ view_mode|clean_class,
]
%}
{% set wrapper_tag = 'div' %}
{% block content_wrapper %}
  <{{ wrapper_tag }} {{ attributes.addClass(classes) }}>
  {{ title_suffix.contextual_links }}
  {% if content %}
    {% if media.field_sponsor_url is not empty %}
      <a href="{{ media.field_sponsor_url.0.uri }}">
        {{ content }}
      </a>
    {% else %}
      {{ content }}
    {% endif %}
  {% endif %}
  </{{ wrapper_tag }}>
{% endblock %}
