'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"],A=t.useEditorMode(),{isEditMode:N}=t.useRenderMode(),h="STATIC"===t.usePageType(),q=s.getBadgeContent({detail:p,currentVariant:j,bundleItem:v,useProductCompareAtPrice:T},d?.displayContent,x),I=s.getIsNoDiscountState({props:i,product:p,currentVariant:j,moneyFormat:x,useProductCompareAtPrice:T}),f=l.createClass({...o.getContainerClasses({mode:A,isInstant:h,product:p,currentVariant:j,props:i})}),b=l.createStyle({...c.getContainerStyle(i)}),W=l.createAttr({...n.getEditTooltipAttrs(i,N)}),M=l.createClass({...o.getWrapperClasses(i)}),P=l.createClass({...o.getSubWrapperClass(i,S)}),D=l.createStyle({...c.getSubWrapperStyle({props:i,product:p,currentVariant:j,isEditMode:N})}),B=l.createAttr({...n.getSubWrapperAttrs(i,p)}),k=c.getContentStyleInternal(i),w=l.createClass({...o.getTextContainerClasses()}),E=l.createAttr({...n.getContainerAttrs(i)}),_=l.createClass({...o.getTextWrapperClasses()}),F=l.createStyle({...c.getTextBadgeWrapperStyles({setting:d,styles:m})}),H=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})}),G=l.createClass({...o.getImageClasses()}),J=l.createAttr({...n.getImageAttr({setting:d})});return p?e.jsxs("div",{...E,style:b,className:f,children:[l.If(N&&I,e.jsx(a.default,{...W,children:e.jsx(r.default,{...C,elementType:"secondary",description:u("No discount"),rawMode:!0})}),e.jsx("div",{className:M,children:e.jsxs("div",{...B,className:P,style:D,children:[e.jsx("style",{children:k}),l.If(d?.shape!=="image",e.jsx("div",{className:w,children:e.jsx("div",{className:_,style:F,children:e.jsx("pre",{...R,className:H,style:O,children:q})})}),e.jsx("div",{className:V,style:z,children:e.jsx("img",{...J,className:G,alt:""})}))]})})),t.filterToolbarPreview(g,!0)]}):null};
