{% extends "@core/views/_views-view-withwrapper.html.twig" %}

{% set batch_size = batch_size|default(2) %}

{% block view_rows %}

  {# Views Rows #}
  {% set cards = [] %}

  {% for item in items %}

    {% set card %}

      {% embed "@molecules/tm-lb/link-block/link-block.twig" %}
        {# SETTINGS #}
        {% set link_scope = link_scope %}
        {% set block_class = block_class %}
        {% set header_tag = header_tag %}
        {% set title_display = 'noflex' %}
        {# FIELDS #}
        {% set title = item.title %}
        {% set subtitle = item.subtitle %}
        {% set tags = item.tags %}
        {% set block_link = item.block_link %}
        {% set icon_right = item.icon_right %}
      {% endembed %}

    {% endset %}

    {% set cards = cards|merge([card]) %}

  {% endfor %}

  {# Pass the cards array and the rows scaffolding. #}
  {% include "@organisms/tm-scaffold/rows-cols/rows-cols.twig" with {
    'batch': batch_size,
    'items': cards,
    'auto_height': false,
    'row_class': 'mb-0',
    'col_class': 'col-sm-6 mb-4',
  } only %}

{% endblock %}
