{% import '_macros/price_helpers.html.twig' as price_helpers %}
<noindex>
<div class="recommended with-profile">
<h2 class="border-line">Другие индивидуалки поблизости</h2>
<div class="recommended-list d-flex" id="profileNearestContainer">
{% for profile in nearest_profiles %}
<div class="recommended-item" data-profile-id="{{ profile.id }}">
<div class="recommended-profile">
<a class="d-block recommended-link" href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" target="_blank">
<p class="recommended-heading">
{% if profile.approved %}
<svg class="icon">
<use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify-new"></use>
</svg>
{% endif %}
<span class="recommended-name"><span class="name">{{ profile.name|trans }}</span>, <span class="age">{{ profile.personParameters.age ? profile.personParameters.age : '-' }}</span></span>
</p>
<div class="recommended-avatar">
{% 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', "357x500", "jpg") }}"
class="recommended-avatar-img lazy"
alt="{{ profile.name|trans }}"
loading="lazy"
width="200" height="280">
{% endif %}
</div>
</a>
{% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
<div class="d-flex align-items-center recommended-info">
<div class="recommended-phone phone">{{- profile.phoneNumber -}}</div>
<div class="ml-auto recommended-price price">{{ price_helpers.getProfileMinPrice(profile, 'р') }}</div>
</div>
{% if profile.stations|length > 0 %}
{%- set station = profile.stations|first -%}
<div class="d-flex align-items-center recommended-metro">
<div class="metro-item d-flex">
<a class="modal-list__icons d-flex" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}">
{%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
{{- station.name -}}
</a>
</div>
</div>
{% endif %}
</div>
</div>
{% endfor %}
</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>