'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ProductFeaturedImageCarousel=require("../child/ProductFeaturedImageCarousel.js"),getProductImagesClassName=require("../../composables/getProductImagesClassName.js"),getProductImagesStyles=require("../../composables/getProductImagesStyles.js");const OnlyFeatureImage=e=>{let{isEditMode:r}=core.useRenderMode(),{setting:s,styles:t,gallery:a,builderProps:u,noDataChildren:l,onHandleClickImage:d,children:o}=e,i={...s,...t};if(a?.[0]?.id==="noImageError"&&r)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:l});let{featureImageOnlyOneImageClasses:m}=getProductImagesClassName.getProductImagesClassName(i),{featureImageStyle:g}=getProductImagesStyles.getProductImagesStyles(i);return jsxRuntime.jsxs("div",{className:m,style:g,children:[jsxRuntime.jsx(ProductFeaturedImageCarousel.default,{productImages:a,...i,onHandleClick:(e,r)=>{d(e||"",r)},builderPropUID:u?.uid,builderPropsClass:`gp-product-images-gallery-${u?.uid}`,isFilterByVariantEnabled:e.isFilterByVariantEnabled}),o]})};exports.default=OnlyFeatureImage;
