{% extends "@partials/region/region.html.twig" %}

{% set subscribe_form = site_setting_entity_by_name('subscribe_form') %}

{% block region %}
  <div class="content">
    <div class="block-subscribe">
      <div class="text">
        {% if subscribe_form.field_heading.value %}
          <h3 class="block-subscribe__title">{{ subscribe_form.field_heading.value }}</h3>
        {% endif %}
        {{ site_setting_field('subscribe_form', 'field_text') }}
      </div>
      {% if subscribe_form.field_link.uri %}
        {{ link(subscribe_form.field_link.title, subscribe_form.field_link.uri, create_attribute({'class': ['btn', 'btn--primary'], 'target': '_blank'})) }}
      {% endif %}
    </div>
    {{ content }}
  </div>
{% endblock %}
