'use client';
import{jsx as e,Fragment as r,jsxs as a}from"react/jsx-runtime";import{useRenderMode as t}from"@gem-sdk/core";import l from"../child/ProductFeaturedImageCarousel.js";import{getProductImagesClassName as o}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as s}from"../../composables/getProductImagesStyles.js";let OnlyFeatureImage=i=>{let{isEditMode:m}=t(),{setting:d,styles:u,gallery:c,builderProps:n,noDataChildren:g,onHandleClickImage:p,children:I}=i,f={...d,...u};if(c?.[0]?.id==="noImageError"&&m)return e(r,{children:g});let{featureImageOnlyOneImageClasses:y}=o(f),{featureImageStyle:b}=s(f);return a("div",{className:y,style:b,children:[e(l,{productImages:c,...f,onHandleClick:(e,r)=>{p(e||"",r)},builderPropUID:n?.uid,builderPropsClass:`gp-product-images-gallery-${n?.uid}`,isFilterByVariantEnabled:i.isFilterByVariantEnabled}),I]})};export{OnlyFeatureImage as default};
