{% comment %}
  Renders a carousel of collection-title.

  Usage:
  {% render 'collection-title-style4' %}
{% endcomment %}

<xo-container {% render 'section-layout' %}>
  <xo-animate xo-cascade>
    <xo-carousel
      xo-per-view='{{ section.settings.columns }}'
      xo-loop
      xo-breakpoints='
        {
          1400: {
            perView: 6,
          },
          1200: {
            perView: 5,
          },
          992: {
            perView: 4,
          },
          768: {
            perView: 3,
          },
          576: {
            perView: 2,
          },
        }
      '
      class='collection-title-style4__carousel'
    >
      <xo-carousel-inner>
        <xo-carousel-list>
          {% for block in section.blocks %}
            <xo-carousel-slide>
              <div class='collection-title-style4__nav-text'>
                <a href='{{block.settings.collection.url}}'>
                  {{ block.settings.collection.title }}
                </a>
              </div>
            </xo-carousel-slide>
          {% endfor %}
        </xo-carousel-list>
      </xo-carousel-inner>
      <xo-carousel-prev class='collection-title-style4__arrow-left'
        ><button>{% render 'icon', name: 'arrow-left', icon_size: '12' %}</button></xo-carousel-prev
      >
      <xo-carousel-next class='collection-title-style4__arrow-right'
        ><button>{% render 'icon', name: 'arrow-right', icon_size: '12' %}</button></xo-carousel-next
      >
    </xo-carousel>
  </xo-animate>
</xo-container>
