{% import '_macros/price_helpers.html.twig' as price_helpers %}
{% set profileList = profileList is defined ? profileList : profiles %}
{% for profile in profileList %}
{% set profile = profile.profile is defined ? profile.profile : profile %}
{% set services = profile.providedServices %}
{%- set agePlural = '%age% лет'|trans({'lastnum': profile.personParameters.age|last}) -%}
{%- set ageText = profile.personParameters.age ~ ' ' ~ agePlural ~ ', ' -%}
{%- set cityText = '' -%}
{%- if city is defined and city != default_city() -%}
{%- set cityText = profile.city.name ~ ', ' -%}
{%- endif -%}
{%- set isSelfies = profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
{%- set isVideos = profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
{%- set isComments = profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
{%- if 'profile_list.list_by_station' in app.request.get('_route') -%}
{%- set station = app.request.attributes.get('station') -%}
{%- else -%}
{%- set station = profile.stations|first -%}
{%- endif -%}
{% set firstStation = '' -%}
{% set metroText = ''%}
{% if profile.stations|length > 0 -%}
{% set metroText = station is not null ? 'метро ' ~ station.name ~ ' в ' ~ profile.city.name|geo_name('дательный') ~ ', ' : '' -%}
{% endif -%}
{%- set morpID = profile.id -%}
{%- set serviceNameList = [] -%}
{% for service in services -%}
{% set serviceNameList = serviceNameList|merge([service.name]) %}
{% endfor %}
{%- set service1 = null -%}
{%- set service2 = null -%}
{% if serviceNameList is not empty %}
{%- set service1 = serviceNameList|seo_morphing(morpID) ~ ', ' -%}
{%- set service2 = serviceNameList|seo_morphing(morpID + 105) ~ ', ' -%}
{% if service1 == service2 -%}
{%- set service2 = serviceNameList|seo_morphing(morpID + 104) ~ ', ' -%}
{% if service1 == service2 -%}
{%- set service2 = null -%}
{% endif %}
{% endif %}
{% endif %}
<div class="profiles-item-col"
data-ultra="{{profile.isUltraVip ?? null}}"
data-vip="{{profile.isVip ?? null}}"
data-standart="{{profile.isStandard ?? null}}"
data-active="{{profile.active}}"
data-hidden="{{profile.hidden}}"
data-approved="{{profile.isApproved}}"
data-profile-id="{{profile.id}}">
<div class="profiles-item">
<div class="profiles-item__content d-flex">
{% if ( profile.isApproved ) %}
<div class="profiles-item__verify" title="Фото проверено">
<svg class="icon">
<use xlink:href="#icon-models-list-verify"></use>
</svg>
</div>
{% endif %}
<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 ~ ', ' ~ ageText ~ cityText ~ metroText ~ (service1 is not null ? service1) ~ (service2 is not null ? service2) ~ (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">
{% 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.isHidden %}
{% 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>
{%- 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 isSelfies %}
<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 isVideos %}
<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 isComments %}
<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 %}