'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:o,onHandleClickImage:d,children:l}=e,m={...s,...t};if(a?.[0]?.id==="noImageError"&&r)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:o});let{featureImageOnlyOneImageClasses:g}=getProductImagesClassName.getProductImagesClassName(m),{featureImageStyle:c}=getProductImagesStyles.getProductImagesStyles(m);return jsxRuntime.jsxs("div",{className:g,style:c,children:[jsxRuntime.jsx(ProductFeaturedImageCarousel.default,{productImages:a,...m,onHandleClick:(e,r)=>{d(e||"",r)},builderPropUID:u?.uid,builderPropsClass:`gp-product-images-gallery-${u?.uid}`}),l]})};exports.default=OnlyFeatureImage;
