{% set slides = [1, 2, 3] %}

{% set actions = [
  { label: 'En savoir plus', src: 'https://picsum.photos/200/400?rand=1*' },
  { label: 'En savoir plus', src: 'https://picsum.photos/500/400?rand=1*' }
] %}

<style type="text/css">
  .is-active { box-shadow: 0 0 0 3px var(--vp-c-brand); }
</style>

<div class="w-full h-full relative overflow-hidden">
  {% embed '@ui/organisms/Hero/Hero.twig'
    with {
      surtitle: 'Surtitre',
      surtitle_attr: { class: 'italic' },
      title: 'Lorem ipsum dolor sit amet, consectetur.',
      title_attr: { class: 'text-5xl uppercase font-bold' },
      content_position: 'left',
      description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Facilisi tempor, dignissim diam egestas habitant aliquet. Etiam ac a at mattis pellentesque felis, in phasellus.',
      actions: actions,
      attr: {
        data_component: 'Slider',
        data_option_mode: 'left',
        data_option_fit_bounds: true,
        data_option_contain: true,
        class: 'p-12'
      }
    }
  %}
    {% block background %}
      <div data-ref="wrapper"
        tabindex="0"
        class="absolute top-0 left-0 h-full w-full flex">
        {% for slide in slides %}
          <div class="h-full min-w-full hero__gradient"
            data-component="SliderItem">
            {% include '@ui/atoms/Figure/Figure.twig' with {
              src: 'https://picsum.photos/1200/900?rand=' ~ slide,
              width: 1200,
              height: 900,
              absolute: true,
              fit: 'cover',
              attr: {
                data_option_enter_from: 'opacity-0 transform scale-110',
                data_option_enter_active: 'transition duration-1000 ease-out-expo'
              },
              inner_attr: { class: 'bg-vp-bg' },
              img_attr: { class: 'opacity-0 transform scale-110' }
            } only %}
          </div>
        {% endfor %}
      </div>
    {% endblock %}
    {% block actions %}
      <div data-component="SliderDots"
        class="absolute bottom-12 space-x-4 flex w-full">
        {% for slides in slides %}
          <button type="button"
            data-ref="dots[]"
            data-option-enter-to="is-active"
            class="relative w-3 flex-wrap h-3 bg-white rounded-full">
            <span class="sr-only">Go to slide #{{ loop.index }}</span>
          </button>
        {% endfor %}
      </div>
    {% endblock %}
  {% endembed %}
</div>
