<div class="container-slider">
{*{$sliderParameter[0]->background} permet de savoir si le slider doit etre en background (integre le menu) true ou false la variable est disponible partout*}
    <div class="img-slider {if !empty($sliderParameter) && $sliderParameter[0]->autoPlay} autoplay{/if}">
        {foreach from=$sliders item=slider key=index}
            {* {$sliders->isVisible} idem permet de voir si le slider est actif *}
            {* {if $sliders->isVisible} *}
                <div class="slider-items">
                    <img src="{$slider->image}" alt="Slide {$index}" class="slide">
                
                    <div class="text-slider text-slider-{$slider->textPosition}">
                        <div class="text-content">
                            {if $slider->title}
                                <h1>
                                    {$slider->title}
                                </h1>
                            {/if}

                            {if $slider->subTitle}
                                <p>
                                    {$slider->subTitle}
                                </p>
                            {/if}
                            
                            {if $slider->button}
                                <a href="{$slider->url}" class="btn">{$slider->button}</a>
                            {/if}
                        </div>
                    </div>
                </div>
            {* {/if} *}
        {/foreach}
    </div>


    {if count($sliders) > 1}
        <button class="prev"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M400-80 0-480l400-400 71 71-329 329 329 329-71 71Z"/></svg></button>
        <button class="next"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="m321-80-71-71 329-329-329-329 71-71 400 400L321-80Z"/></svg></button>

        <div class="slider-dots">
            {foreach from=$sliders item=slider key=index}
                <div class="dot {if $index == 0} active {/if}" data-index="{$index}"></div>
            {/foreach}
        </div>

        <script src="{$urls.base_url}modules/lcvprestatheme/views/js/slider.js"></script>
    {/if}
</div>