{% extends app.request.xmlHttpRequest ? 'ajax.html.twig' : 'base.html.twig' %}
{% block content %}
{% set popup = popup|default(null) %}
{% set imageClass = 'popup-modal__image' %}
{% set pictureClass = 'popup-modal__picture' %}
{% if popup is has_image('imageMobName') %}
{% set imageClass = 'popup-modal__image popup-modal__image_desk' %}
{% set pictureClass = 'popup-modal__picture popup-modal__picture_desk' %}
{% endif %}
<div class="popup-modal">
<div class="popup-modal__wrap">
<div class="popup-modal__image-wrapper">
{% if popup is has_image('imageName') %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: popup,
field: 'imageFile',
size: 'popup_thumb',
alt: popup.title,
class: imageClass,
classPicture: pictureClass,
} %}
{% endif %}
{% if popup is has_image('imageMobName') %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: popup,
field: 'imageMobFile',
size: 'popup_thumb',
alt: popup.title,
class: 'popup-modal__image popup-modal__image_mob',
classPicture: 'popup-modal__picture popup-modal__picture_mob',
} %}
{% endif %}
</div>
<div class="popup-modal__info {% if form.vars.submitted %} popup-modal__info_step-form{% endif %}">
{% include 'pages/modal/popup/popup-modal-form.html.twig' with {
class: 'popup-modal__form'
} %}
</div>
</div>
</div>
{% endblock %}