{% import '_macros/price_helpers.html.twig' as price_helpers %}
<noindex>
<div class="nearest-widget recommended-widget">
<h2 class="border-line">Индивидуалки поблизости</h2>
<div class="recommended-container">
<div class="recommended-list {{ classname is defined and classname ? classname : '' }}" id="profileNearestContainer">
{% for profile in nearest_profiles %}
<div class="profiles-item-row" data-profile-id="{{ profile.id }}">>
<div class="profiles-item">
<div class="profiles-item__content d-flex">
<a href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" class="profiles-item__images d-block" target="_blank">
{% set photo = profile|avatar %}
{% if photo %}
{% set alt = profile.name|trans ~ ', ' ~ (profile.seo.phone is defined ? "снять по тел. " ~ profile.seo.phone ~ ', ' : '') ~ 'анкета №' ~ profile.id %}
<img data-src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}"
class="lazy img-fluid"
alt="{{ alt }}"
loading="lazy"
width="200" height="280">
{% endif %}
</a>
<div class="profiles-item__info flex-fill">
<div class="profiles-item__header">
<div class="profiles-item__header-title d-flex align-items-center">
<a href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" target="_blank">{{ profile.name|trans }}</a>
</div>
{% if profile.isActive or not profile.hidden %}
{% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
<button class="profiles-item__header-phone ml-auto" type="button" onclick="this.classList.add('d-none');this.nextElementSibling.classList.remove('d-none')">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none"><path fill="#F27900" d="m15.7 12.53-3.64-3.32a.9.9 0 0 0-1.25.04l-2.15 2.21a5.16 5.16 0 0 1-2.63-1.49 5.13 5.13 0 0 1-1.5-2.63L6.76 5.2a.9.9 0 0 0 .03-1.25L3.47.3A.9.9 0 0 0 2.22.22L.27 1.89a.9.9 0 0 0-.26.58c-.02.23-.27 5.54 3.85 9.67a13.6 13.6 0 0 0 9.67 3.85.9.9 0 0 0 .58-.26l1.67-1.95a.9.9 0 0 0-.07-1.25Z"/></svg>
<span>Показать телефон</span>
</button>
<!--noindex--><a href="tel:{{ onlyPhoneNumber }}" rel="nofollow" class="profiles-item__header-phone ml-auto d-none">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none"><path fill="#F27900" d="m15.7 12.53-3.64-3.32a.9.9 0 0 0-1.25.04l-2.15 2.21a5.16 5.16 0 0 1-2.63-1.49 5.13 5.13 0 0 1-1.5-2.63L6.76 5.2a.9.9 0 0 0 .03-1.25L3.47.3A.9.9 0 0 0 2.22.22L.27 1.89a.9.9 0 0 0-.26.58c-.02.23-.27 5.54 3.85 9.67a13.6 13.6 0 0 0 9.67 3.85.9.9 0 0 0 .58-.26l1.67-1.95a.9.9 0 0 0-.07-1.25Z"/></svg>
<span>{{- profile.phoneNumber -}}</span>
</a><!--/noindex-->
{% endif %}
</div>
{%- set station = profile.stations ? profile.stations|first : null -%}
{# profile.stations ? profile.stations|first : #}
{%- if station -%}
<div class="item-info metro d-flex align-items-center">
<svg class="icon mr-1">
<use xlink:href="#icon-metro"></use>
</svg>
<a href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank" title="{{ station.name }}">
{{- station.name -}}
</a>
</div>
{%- endif -%}
<div class="item-info">
<p class="d-flex align-items-center mb-1">
Возраст:<span class="d-inline-block ml-auto">{{ profile.personParameters.age ? profile.personParameters.age : '-' }}</span>
</p>
<p class="d-flex align-items-center mb-1">
Рост:<span class="d-inline-block ml-auto">{{ profile.personParameters.height ? profile.personParameters.height : '-' }}</span>
</p>
<p class="d-flex align-items-center mb-1">
Вес:<span class="d-inline-block ml-auto">{{ profile.personParameters.weight ? profile.personParameters.weight : '-' }}</span>
</p>
<p class="d-flex align-items-center mb-1">
Грудь:<span class="d-inline-block ml-auto">{{ profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' }}</span>
</p>
</div>
{%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
{%- set minPriceHour -%}{{ price_helpers._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
{%- set minPriceTwo -%}{{ price_helpers._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
{%- set minPriceNight -%}{{ price_helpers._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
{%- set hasOutPrice -%}{{- price_helpers._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
<div class="item-info">
<p class="d-flex align-items-center mb-1">
Час:<span class="d-inline-block ml-auto description">{{ minPriceHour != '-' ? minPriceHour : '-' }}</span>
</p>
<p class="d-flex align-items-center mb-1">
2 часа:<span class="d-inline-block ml-auto description">{{ minPriceTwo != '-' ? minPriceTwo : '-' }}</span>
</p>
<p class="d-flex align-items-center mb-1">
Ночь:<span class="d-inline-block ml-auto description">{{ minPriceNight != '-' ? minPriceNight : '-' }}</span>
</p>
<p class="d-flex align-items-center mb-1">
Экспресс:<span class="d-inline-block ml-auto description">{{ hasOutPrice == '1' ? 'Есть' : '-' }}</span>
</p>
</div>
</div>
<div class="profiles-item__status">
{% if profile.selfies|length > 0 %}
<div class="status-item d-flex align-items-center justify-content-center" data-toggle="tooltip" data-placement="top" title="Есть селфи">
<svg class="icon">
<use xlink:href="#icon-selfie-thumb"></use>
</svg>
</div>
{% endif %}
{% if profile.videos|length > 0 %}
<div class="status-item d-flex align-items-center justify-content-center" data-toggle="tooltip" data-placement="top" title="Есть видео">
<svg class="icon">
<use xlink:href="#icon-video-thumb"></use>
</svg>
</div>
{% endif %}
{% if profile.comments|length > 0 %}
<div class="status-item d-flex align-items-center justify-content-center" data-toggle="tooltip" data-placement="top" title="Есть комментарии">
<svg class="icon">
<use xlink:href="#icon-comments-thumb"></use>
</svg>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const profileIdList = [];
{% for profile in nearest_profiles %}
profileIdList.push({{ profile.id }});
{% endfor %}
window.increase_shows({profiles: profileIdList});
});
</script>
</noindex>