import Swiper from 'swiper';

function recommendedSliderInit() {
    const block = $('.recommended-slider')
    const items = block.find('.js-recommended-slider');

    if (!block.length || !items.length) {
        return;
    }

    items.each(function() {
        const el = $(this);

        new Swiper(el, {
            slidesPerView: 'auto',
            spaceBetween: 24,
            prevButton: block.find('.recommended-slider__button_prev'),
            nextButton: block.find('.recommended-slider__button_next'),
        });
    });
}

export default () => {
    const popup = $('.recommended-slider').parents('.popup');

    recommendedSliderInit();

    popup.on('aftershow', recommendedSliderInit);
};

@@ -386,37 +386,65 @@
     prevButton: 
-block
+el.parents('.recommended-slider')
 .find('.recommen
@@ -494,21 +494,49 @@
 Button: 
-block
+el.parents('.recommended-slider')
 .find('.

fix slider