{% extends 'front/base_front.html.twig' %}
{% block title %}{{ 'Pages.WishList.Title'|trans({} , 'messages_front') }}{% endblock %}
{% block container %}
{% if responseHotels is not empty %}
<section id="explore_area" class="section_padding">
<div class="container">
<div class="row">
{% for favoritehotel in responseHotels %}
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="theme_common_box_two img_hover">
<div class="theme_two_box_img">
<img src="{{ favoritehotel.thumbImage }}" style="height: 300px;" alt="{{ favoritehotel.name }}">
<p><i class="fas fa-map-marker-alt"></i>{{ favoritehotel.city }}
, {{ favoritehotel.country }}
</p>
</div>
<div class="theme_two_box_content">
<h4>
{{ favoritehotel.name }}
</h4>
<span class="review_star">
<span class="form-check-label" for="flexCheckDefault">
{% for i in 1..favoritehotel.starRating %}
<i class="fas fa-star color_theme"></i>
{% endfor %}
</span>
</span>
<p></p>
<h3>
<a href="{{ path('hotel_detail', {id: favoritehotel.hotelId, country_label: favoritehotel.country, city_label: favoritehotel.city, hotel_label: favoritehotel.name}) }}">
<center>
<button type="button" class="btn btn-primary">
{{ 'Pages.WishList.Buttons.ShowHotel'|trans({}, 'messages_front') }}
</button>
</center>
</a>
</h3>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if responseParties is not empty %}
<h1>{{ 'Pages.WishList.Fields.WishListParty'|trans({}, 'messages_front') }}</h1>
<div class="container">
<div class="row">
{% for party in responseParties %}
{% set hotel = party.hotelStayRequired == 1 ? party.hotelContract.hotel : "" %}
{% set city = party.hotelStayRequired == 1 ? hotel.city : party.city %}
{% set cityName =city|replace({' ': '-'}) %}
{% set currency = party.provider.currency %}
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="theme_common_box_two img_hover">
<div class="theme_two_box_img">
{% set primary_image = null %}
{% for image in party.images %}
{% if image.displayOrder == 1 %}
{% set primary_image = image %}
{% endif %}
{% endfor %}
<img class="img-party" loading="lazy"
src="{{ absolute_url(primary_image.url |default( asset('front/assets/img/tab-img/hotel1.png'))) }}"
alt="{{ party.title }}">
<p><i class="fas fa-map-marker-alt"></i>{{ city }}
, {{ city is not null ? city.country : '' }}</p>
{% if (party.hotelStayRequired == 1) %}
<div class="ribbon-party">
Séjour <br> obligatoire
</div>
{% endif %}
</div>
<div class="theme_two_box_content">
<a href="{{ path('app_front_party_detail' , {
id : party.id,
partyName:party.title|replace({' ': '-'}),
city:cityName,
hotelName: hotel is not empty? hotel.name|trim |replace({' ': '-'}) : party.address|trim |replace({' ': '-'})
}) }}" target="_blank">
<h4>
{{ party.title }}
</h4>
<p class="text-nowrap">
{% if party.address is not empty %}
<i class="fas fa-map"></i> {{ party.address }}
{% endif %}
{% if hotel is not empty %}
<i class="fas fa-map"></i> {{ hotel }}
{% endif %}
</p>
</a>
<p class=p-date-party>
<span class="date-party"> <i
class="bi bi-calendar3"></i> {{ party.date|date('d/m/Y') }}
</span>
{% if hotel is not empty %}
<span class="star-hotel-party">
{% for _ in 0 .. hotel.starRating %}
<i class="fas fa-star color_theme"></i>
{% endfor %}
</span>
{% endif %}
</p>
<h3>
<span>Price starts from</span>
{{ party.productElements|reduce( (lowest , partyZone) => min(lowest ??
partyZone.adultSalePrice , partyZone.adultSalePrice )) |format_currency(
currency,
{rounding_mode: 'floor'} , locale='de'
) }}
<sup>{{ currency }}</sup>
</h3>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}