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