{% set classes = [
  'block',
  'rich-text-block',
  width ?? '',
  bg_color ? 'bg-' ~ bg_color : '',
  text_color ? 'text-' ~ text_color : '',
  border_radius ? 'rounded-' ~ border_radius : ''
] %}

{% set html_tag = html_tag ?? 'div' %}

<{{ html_tag }} {{ attributes.addClass(classes) }}>
  {{ title_prefix }}
  {% if heading %}
    {% include "vartheme_bs5:heading" with {
      attributes: heading_attributes,
      html_tag: 'h2',
      content: heading,
      heading_utility_classes: ['rich-heading', 'mb-2']
    } only %}
  {% endif %}
  {{ title_suffix }}

  <div class="rich-body mb-2">{{ content }}</div>
</{{ html_tag }}>