{#
/**
 * @file
 * Vartheme BS5 Starter Kit implementation for Image Block component.
 *
 * Available variables:
 * - plugin_id: The ID of the block implementation.
 * - title: The configured title of the block if visible.
 * - configuration: A list of the block's configuration values.
 *   - provider: The module or other provider that provided this block plugin.
 *   - Block plugin specific settings will also be stored here.
 * - content: The content of this block.
 * - attributes: array of HTML attributes populated by modules, intended to
 *   be added to the main container tag of this template.
 * - title_attributes: Same as attributes, except applied to the main title
 *   tag that appears in the template.
 * - title_prefix: Additional output populated by modules, intended to be
 *   displayed in front of the main title tag that appears in the template.
 * - title_suffix: Additional output populated by modules, intended to be
 *   displayed after the main title tag that appears in the template.
 *
 * @see template_preprocess_block()
 */
#}
{%
  set classes = [
    'block',
    'varbase-image-block',
    'block-' ~ configuration.provider|clean_class,
    'block-' ~ plugin_id|clean_class,
  ]
%}
<div{{ attributes.addClass(classes) }}>
  {{ title_prefix }}
  {% if title %}
    {% include "vartheme_bs5:heading" with {
      attributes: title_attributes,
      content: title,
      html_tag: title_tag
    } only %}
  {% endif %}
  {{ title_suffix }}
  {% block content %}
    {% if link_href|render is not empty %}
      <a href="{{ link_href }}">
    {% endif %}
    {{ content }}
    {% if link_href|render is not empty %}
      </a>
    {% endif %}
  {% endblock %}
</div>
