'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("./utils/common.js");require("./constants.js");var r=require("../../../common/components/NoDataState.js"),a=require("../../../common/components/TooltipHover.js"),l=require("@gem-sdk/system"),n=require("./common/attrs.js"),o=require("./common/classes.js"),c=require("./common/styles.js");exports.default=i=>{let{t:u}=t.useI18nStore(),{setting:d,styles:m,children:g,builderAttrs:C,...y}=i,p=t.useProduct(),j=t.useCurrentVariant(),{moneyFormat:x}=t.useMoneyFormat(),S=t.useCurrentDevice(),{useProductCompareAtPrice:T}=t.useProductBundleDiscount(),v=y?.["bundle-item"],h=t.useEditorMode(),{isEditMode:A}=t.useRenderMode(),N="STATIC"===t.usePageType(),{settings:q}=t.useSafeGetProductListSettings(),I=q?.sameHeight,f=s.getBadgeContent({detail:p,currentVariant:j,bundleItem:v,useProductCompareAtPrice:T},d?.displayContent,x),b=s.getIsNoDiscountState({props:i,product:p,currentVariant:j,moneyFormat:x,useProductCompareAtPrice:T}),P=l.createClass({...o.getContainerClasses({mode:h,isInstant:N,product:p,currentVariant:j,props:i,isSameHeightInProductList:I})}),W=l.createStyle({...c.getContainerStyle(i)}),M=l.createAttr({...n.getEditTooltipAttrs(i,A)}),D=l.createClass({...o.getWrapperClasses(i)}),B=l.createClass({...o.getSubWrapperClass(i,S)}),k=l.createStyle({...c.getSubWrapperStyle({props:i,product:p,currentVariant:j,isEditMode:A})}),w=l.createAttr({...n.getSubWrapperAttrs(i,p)}),E=c.getContentStyleInternal(i),H=l.createClass({...o.getTextContainerClasses()}),_=l.createAttr({...n.getContainerAttrs(i)}),F=l.createClass({...o.getTextWrapperClasses()}),G=l.createStyle({...c.getTextBadgeWrapperStyles({setting:d,styles:m})}),L=l.createClass({...o.getTextContentClasses(m)}),O=l.createStyle({...c.getTextContentStyle({setting:d,styles:m})}),R=l.createAttr({...n.getTextContentAttrs()}),V=l.createClass({...o.getImageContainerClasses()}),z=l.createStyle({...c.getImageContainerStyles({setting:d,styles:m})}),J=l.createClass({...o.getImageClasses()}),K=l.createAttr({...n.getImageAttr({setting:d})});return p?e.jsxs("div",{..._,style:W,className:P,children:[l.If(A&&b,e.jsx(a.default,{...M,children:e.jsx(r.default,{...C,elementType:"secondary",description:u("No discount"),rawMode:!0})}),e.jsx("div",{className:D,children:e.jsxs("div",{...w,className:B,style:k,children:[e.jsx("style",{children:E}),l.If(d?.shape!=="image",e.jsx("div",{className:H,children:e.jsx("div",{className:F,style:G,children:e.jsx("pre",{...R,className:L,style:O,children:f})})}),e.jsx("div",{className:V,style:z,children:e.jsx("img",{...K,className:J,alt:""})}))]})})),t.filterToolbarPreview(g,!0)]}):null};
