'use client';
import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useI18nStore as m,useProduct as o,useCurrentVariant as t,useMoneyFormat as r,useCurrentDevice as i,useProductBundleDiscount as l,useEditorMode as a,useRenderMode as c,usePageType as n,useSafeGetProductListSettings as d,filterToolbarPreview as p}from"@gem-sdk/core";import{getBadgeContent as h,getIsNoDiscountState as y}from"./utils/common.js";import"./constants.js";import f from"../../../common/components/NoDataState.js";import N from"../../../common/components/TooltipHover.js";import{createClass as j,createStyle as u,createAttr as g,If as v}from"@gem-sdk/system";import{getEditTooltipAttrs as T,getSubWrapperAttrs as k,getContainerAttrs as x,getTextContentAttrs as C,getImageAttr as H}from"./common/attrs.js";import{getContainerClasses as S,getWrapperClasses as b,getSubWrapperClass as w,getTextContainerClasses as A,getTextWrapperClasses as B,getTextContentClasses as D,getImageContainerClasses as I,getImageClasses as M}from"./common/classes.js";import{getContainerStyle as P,getSubWrapperStyle as q,getContentStyleInternal as z,getTextBadgeWrapperStyles as E,getTextContentStyle as F,getImageContainerStyles as G}from"./common/styles.js";let J=J=>{let{t:K}=m(),{setting:L,styles:O,children:Q,builderAttrs:R,...U}=J,V=o(),W=t(),{moneyFormat:X}=r(),Y=i(),{useProductCompareAtPrice:Z}=l(),$=U?.["bundle-item"],_=a(),{isEditMode:ee}=c(),es="STATIC"===n(),{settings:em}=d(),eo=em?.sameHeight,et=h({detail:V,currentVariant:W,bundleItem:$,useProductCompareAtPrice:Z},L?.displayContent,X),er=y({props:J,product:V,currentVariant:W,moneyFormat:X,useProductCompareAtPrice:Z}),ei=j({...S({mode:_,isInstant:es,product:V,currentVariant:W,props:J,isSameHeightInProductList:eo})}),el=u({...P(J)}),ea=g({...T(J,ee)}),ec=j({...b(J)}),en=j({...w(J,Y)}),ed=u({...q({props:J,product:V,currentVariant:W,isEditMode:ee})}),ep=g({...k(J,V)}),eh=z(J),ey=j({...A()}),ef=g({...x(J)}),eN=j({...B()}),ej=u({...E({setting:L,styles:O})}),eu=j({...D(O)}),eg=u({...F({setting:L,styles:O})}),ev=g({...C()}),eT=j({...I()}),ek=u({...G({setting:L,styles:O})}),ex=j({...M()}),eC=g({...H({setting:L})});return V?e("div",{...ef,style:el,className:ei,children:[v(ee&&er,s(N,{...ea,children:s(f,{...R,elementType:"secondary",description:K("No discount"),rawMode:!0})}),s("div",{className:ec,children:e("div",{...ep,className:en,style:ed,children:[s("style",{children:eh}),v(L?.shape!=="image",s("div",{className:ey,children:s("div",{className:eN,style:ej,children:s("pre",{...ev,className:eu,style:eg,children:et})})}),s("div",{className:eT,style:ek,children:s("img",{...eC,className:ex,alt:""})}))]})})),p(Q,!0)]}):null};export{J as default};
