'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("../../../carousel-v3/components/root/Carousel.js"),l=require("../../../carousel-v3/components/item/CarouselItem.js"),i=require("../../../image/components/NextImage.js");require("../../../modal/components/confirm.js");var s=require("../../../modal/components/Modal.js"),r=require("react"),d=require("./common/productFeaturedImage.js");exports.default=({builderPropUID:n,productImages:a,open:u,imageRatio:m,onHandleClose:p})=>{let c=t.useFeaturedImageGlobal(),g=r.useMemo(()=>{let e=a?.findIndex(e=>e.id===c?.id);return e&&e>0?e:0},[a,c]),h={desktop:a&&a.length>1,mobile:a&&a?.length>1,tablet:a&&a?.length>1};return e.jsx(s.default,{setting:{open:u},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>p(),disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:g,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},controlOverContent:{desktop:!0,mobile:!0,tablet:!0},arrow:h},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}}},moveToIdx:g,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,builderProps:{uid:n},children:a?.map(o=>e.jsx(l.default,{className:`gem-slider-item gem-slider-item-${n} gp-flex gp-items-center gp-justify-center gp-px-4`,children:e.jsx(i.default,{src:d.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:m},className:t.cls("gp-h-full gp-w-full gp-object-contain")},o?.id)},o?.id))})})};
