{#
/**
 * @file
 * Theme implementation to display a block.
 *
 * This block template gets extended by blocks that should only show the wrapper
 * when a user is logged in.
 */
#}
{% set classes = [
  'c-block',
  'c-block--admin',
] %}

{% set block_content %}
  {% block block_content %}
    {{ content }}
  {% endblock %}
{% endset %}

{% if logged_in and title_suffix.contextual_links %}
  {% set hide_wrapper = false %}
{% else %}
  {% set hide_wrapper = true %}
{% endif %}

{% embed '@components/block/block.twig' with {
  'attributes': attributes.addClass(classes),
  'hide_wrapper': hide_wrapper,
  'has_constrain': false,
  'hide_content_wrapper': true,
  'label': false,
} %}

  {% block content %}
    {{ block_content }}
  {% endblock %}

{% endembed %}
