'use client';
"use strict";var e=require("react/jsx-runtime"),r=require("react"),s=require("../../../../common/helper.js"),t=require("@gem-sdk/system"),a=require("./Arrow.js"),o=require("./CarouselPostPurchase.js"),u=require("../../../hooks/useCarousel.js"),c=require("../../../common/classes.js"),i=require("../../../common/styles.js");exports.CarouselWrapperPostPurchase=({styles:l,setting:n,productImages:m,objectFit:h="cover",aspectRatio:p,itemPerSlide:g=1,spacing:j,navigation:P="none",vertical:d=!1,border:q="none",idxActive:v})=>{let x={...l,...n},{layoutType:y}=x||{},{setMoveToIdx:C,setMaxIdx:f}=u.useCarousel(),w=s.postPurchaseSpacing[j||"none"]??"0px",b="one-col"===y,A=t.createClass(c.getImageListClass()),I=t.createStyle(i.getImageListStyle({gap:w,vertical:d}));return r.useEffect(()=>{let e=m.length-Number(g||0);f(e)},[m.length,g,f]),r.useEffect(()=>{(v||0===v)&&1===g&&C(v)},[v,g,C]),e.jsxs("div",{className:A,style:I,children:[e.jsx(a.ArrowPostPurchase,{type:"prev",navigation:P,vertical:d,hidden:b}),e.jsx(o.CarouselPostPurchase,{productImages:m,itemPerRow:g,border:q,aspectRatio:p,objectFit:h,vertical:d}),e.jsx(a.ArrowPostPurchase,{type:"next",navigation:P,vertical:d,hidden:b})]})};
