{# LIBRARIES #}
{{ attach_library('ui_patterns/tourism_hub_intro_block.tourism_hub_intro_block_lib') }}

{% set text_only = not header and not image and not link ? 'text-only' : '' %}
{% set text_section %}
  {% if header %}
    {% include '@organisms/tm-th/partials/tourism-header.twig' with {
      "header": header
    } only %}
  {% endif %}
  <p class="th-intro-text text-custom-color {{ text_only }}">{{ text }}</p>
  {% if link %}<p>{{ link }}</p>{% endif %}
{% endset %}

<div class="mb-5">
{% if image %}
  <div class="row mb-5">
    <div class="col-md-6">
      {{ text_section }}
    </div>
    <div class="col-md-6">
      <p>{{ image }}</p>
    </div>
  </div>
{% else %}
  {{ text_section }}
{% endif %}
</div>