"use client";
import { jsxs as h, jsx as e } from "react/jsx-runtime";
import { Navigation as S } from "swiper/modules";
import { Swiper as w, SwiperSlide as u } from "swiper/react";
import { useSwiper as f } from "../../utils/useSwiper/useSwiper.es.js";
/* empty css                                                                       */
/* empty css                                                                                   */
/* empty css                                                                                   */
import i from "../../components/ProductPairs/productPairs.module.css";
import { ProductGalleryCard as C } from "../ProductGalleryCard/ProductGalleryCard.es.js";
import { ProgressButton as N } from "../ProgressButton/ProgressButton.es.js";
const g = [S], y = ({ productCards: r }) => {
  const {
    isBeginning: s,
    isEnd: o,
    setIsEnd: l,
    handleSlideChange: n,
    handlePrevClick: a,
    handleNextClick: t,
    onSwiperInit: d,
    handleSwiperResize: c
  } = f();
  return /* @__PURE__ */ h("div", { className: i.root, children: [
    /* @__PURE__ */ e("div", { className: i.carouselArea, children: /* @__PURE__ */ e(
      w,
      {
        onSwiper: d,
        onResize: c,
        onSlideChange: n,
        onReachEnd: () => l(!0),
        modules: g,
        spaceBetween: 0,
        slidesPerView: "auto",
        className: i.swiper,
        children: r.slice(0, 2).map((m, p) => /* @__PURE__ */ e(u, { className: i.swiperSlide, children: /* @__PURE__ */ e("div", { className: i.card, children: /* @__PURE__ */ e(C, { ...m, isHoverable: !1 }) }) }, p))
      }
    ) }),
    /* @__PURE__ */ e("div", { className: i.swiperControlsMobile, children: /* @__PURE__ */ e(
      N,
      {
        left: {
          disabled: s,
          onClick: a
        },
        right: {
          disabled: o,
          onClick: t
        }
      }
    ) })
  ] });
};
export {
  y as ProductPairs
};
