{#
/**
 * @file activity.html.twig
 * Default theme implementation to present Activity data.
 *
 * This template is used when viewing Activity pages.
 *
 *
 * Available variables:
 * - content: A list of content items. Use 'content' to print all content, or
 * - attributes: HTML attributes for the container element.
 *
 * @see template_preprocess_activity()
 *
 * @ingroup themeable
 */
#}

{{ attach_library('socialbase/stream') }}

{%
  set classes = [
  'media',
  post and not published ? 'post-unpublished',
]
%}

<li class="stream-item">

  <i class="stream-icon"></i>

  <div class="card card--stream {{ extra_stream_class }}">

    <div class="card__block">

      <div class="media-wrapper">

        <div {{ attributes.addClass(classes) }}>

          <div class="media-left avatar" aria-hidden="true">
            {% if actor %}
              {{- actor -}}
            {% endif %}
          </div>

          <div class="media-body">
            <div class="media-heading text-m">
              {% if content.field_activity_output_text %}
                {{- content.field_activity_output_text -}}
              {% endif %}

              <div class="post-date">
                {{ date }}
                {% if visibility_icon and visibility_label %}
                  <svg class="margin-left-s icon-visibility">
                    <title>{% trans %} Visibility {% endtrans %}</title>
                    <use xlink:href="#icon-{{ visibility_icon }}"></use>
                  </svg>
                  <strong>{{ visibility_label }}</strong>
                {% endif %}
                {% if post and not published %}
                  <span class="badge badge-default badge--pill">
                    {% trans %} unpublished {% endtrans %}
                  </span>
                {% endif %}

              </div>
            </div>

          </div>

        </div>

        {% if content.field_activity_entity %}
          {{ content.field_activity_entity }}
        {% endif %}

      </div>

    </div>

  </div>


</li>
