{% set position_texte = ({ 0: "text-center", 1: "text-start", 2: "text-end" }[widget.positiontext]|default("text-center")) %}
{% if resultats is defined and resultats is not empty %}
<div id="widget-{{widget.id}}" class="widget-content py-4 {{position_texte}}" {% if widget.bgimage is defined and widget.bgimage != null %}style="background: url({{asset_image(widget.bgimage)}}) " {% elseif widget.bgcolor != null %}style="background-color:{{widget.bgcolor}}"{% endif %}>
<div class="container-fluid content-wrapper">
<div class="list-services {{position_texte}}">
<div class="contenu-list">
{% if parametre.actiftitre == true %}
<div class="site-title" data-aos="fade-up" data-aos-easing="linear" data-aos-delay="50">{{parametre.titre}}</div>
{% endif %}
{% if widget.Title != "" %}
<h2 class="title-2" data-aos="fade-up" data-aos-easing="linear" data-aos-delay="100">{{widget.Title|raw}}</h2>
{% endif %}
{% if widget.description is not empty %}
<div class="text-bloc" data-aos="fade-up" data-aos-easing="linear" data-aos-delay="150">
{{widget.description|raw}}
</div>
{% endif %}
</div>
{% set data_columns = { '0':'3','1': '3', '2': '1', '4': '1' }[widget.multiaffichage] %}
{% set data_style = { '0':'compact','1': 'compact', '2': 'wide', '4': 'wide' }[widget.multiaffichage] %}
{% if template is defined and template is not empty %}
{{ include(template_from_string(template.twig)) }}
{% endif %}
</div>
</div>
{% if widget.typelien is not empty and widget.typelien != 1 and widget.buttonlabel is not empty %}
{% if widget.typelien == 2 %}
<div class="item-link {{position_texte}}">
<button class="btn-theme" onclick="window.location.href = '{{resolveInternalSlugLink(widget.lieninterne)}}';" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
</div>
{% elseif widget.typelien == 3 %}
<div class="item-link {{position_texte}}">
<button class="btn-theme" onclick="window.open('{{widget.lienexterne}}','_blank');" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
</div>
{% elseif widget.typelien == 4 %}
<div class="item-link {{position_texte}}">
<a class="btn-theme" href="tel:{{widget.telephone}}" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</a>
</div>
{% endif %}
{% endif %}
</div>
{% endif %}