{% extends '@kohinos/common/layout.html.twig' %}

{% block content %}
<div class='container prestalist mt-2'>
	{% if type == 'Prestataires' and tav_env == 1 %}
		{% set label = 'Points de vente' %}
	{% else %}
		{% set label = type %}
	{% endif %}
	{% if tav_env == 1 %}
		{% set label2 = 'Points de vente' %}
	{% else %}
		{% set label2 = 'Prestataires' %}
	{% endif %}
	{% include '@kohinos/block/breadcrumb.html.twig' with {'label' : label, 'label2': label2, 'url2': path('liste_prestataire', {'order': 'groupelocal'}) } %}
	{% if type == 'Prestataires' %}
	   	<div class="d-flex justify-content-center">
		   	<div class="btn-group text-center mb-2" role="group" aria-label="Basic example">
				<a href='#' type="button" class="btn btn-primary">Par nom</a>
				<a href='{{ path('liste_prestataire', {'order': 'groupelocal'}) }}' type="button" class="btn btn-secondary">Par groupe local</a>
			</div>
		</div>
	{% else %}
		<h1 class='text-primary mb-4'>{{ type }}</h1>
	{% endif %}
    <div class="row">
    {% for presta in prestas %}
	    <div class="col-12 col-md-6 mb-2">
	    	{% include '@kohinos/presta/onepresta.html.twig' %}
		</div>
		{% if loop.index%2 == 0 %}
			</div>
			<div class="row">
		{% endif %}
    {% endfor %}
	</div>
</div>
{% endblock %}
