{# Make a card slides array. This is a slide of cards #}
{% set cards_slides = [] %}
{% for items in slides %}
  {# Make an array of cards using the plain card template. #}
  {% set cards = items %}
  {# Add these cards to scaffold, and in turn add that row to slide content #}
  {% set card_slide_content %}
    {% include "@organisms/tm-scaffold/rows-cols/rows-cols.twig" with {
      'wrapper_class': wrapper_class,
      'batch': batch,
      'items': cards,
      'auto_height': true,
    } only %}
  {% endset %}
  {# Add the slide content and unique slide ID to a slide #}
  {% set card_slide = {
    'sid': pid ~ '-' ~ loop.index0,
    'slide': card_slide_content
  } %}
  {# Add the slide to the card slides array #}
  {% set cards_slides = cards_slides|merge([card_slide]) %}
{% endfor %}
{# IF we have any card slides, then add them to a carousel #}
{% if not cards_slides is empty %}
  {% include "@organisms/tm-bs/carousel/carousel.twig" with {
    'pid': pid,
    'slides': cards_slides,
    'show_controls': false,
    'show_indicators': true,
    'fade': true,
    'slide_classes': 'col-xl-6 col-lg-12 col-md-6',
    'slide_wrapper_classes': 'row',
    'carousel_class': 'crsl-only-lg',
  } %}
{% endif %}
