{{ attach_library('ui_patterns/scrolling_indicator.scrolling_indicator_lib') }}

{% set slides = slides|default([]) %}
{% set cards_per_slide = cards_per_slide|default(1) %}
{% set range_numb = range_numb|default(0) %}

<div class="mobile-slider" data-mobile-slider>
  <div class="mobile-slider__track">
    {% for slide in slides %}
      <div class="mobile-slider__slide{% if loop.first %} active{% endif %}" data-slide-index="{{ loop.index0 }}">
        {# Try printing the slide directly instead of slide.content #}
        {{ slide }}
      </div>
    {% else %}
      {# Optionally, if slides are empty, you may output a fallback message #}
      <p>No slides available.</p>
    {% endfor %}
  </div>
  <div class="mobile-slider__dots">
    {% for slide in slides %}
      <span class="mobile-slider__dot{% if loop.first %} mobile-slider__dot--active{% endif %}" data-dot-index="{{ loop.index0 }}"></span>
    {% endfor %}
  </div>
</div>
