import{composeClasses as e,composeTypographyClassName as t}from"@gem-sdk/core";import{toggleBadge as r}from"../utils/renderBadgeILP.js";import{getAlignShape as s,getShapePlacementClass as g}from"../utils/common.js";let l=({mode:t,isInstant:s,product:g,currentVariant:l,props:i,isSameHeightInProductList:p})=>{let{setting:o,builderProps:a}=i,n="gp-shrink-0 product-badge ",d=!t&&s?r({triggers:o?.displayTrigger,productDetail:g,productVariant:l,isSameHeightInProductList:p}):`${a?.uid}`,u=a?.builderData?.advanced?.cssClass||"";return d&&(n+=`${d} `),u&&(n+=`${u} `),a?.uid&&(n+=`${a?.uid} `),o?.positionWithImage==="inside"&&(n+="inside-image "),{...e(n)}},i=()=>({...e("gp-w-full gp-h-full gp-overflow-hidden product-badge-item")}),p=()=>({...e("gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center gp-overflow-hidden")}),o=r=>{let s="gp-break-words gp-text-center ",g=t(r?.typo);return g&&(s+=`${g} `),{...e(s)}},a=()=>({...e("product-badge-item gp-w-full gp-h-full gp-overflow-hidden")}),n=()=>({...e("gp-object-cover gp-w-full gp-h-full gp-pointer-events-none")}),d=t=>{let{styles:r,setting:g}=t,{align:l}=r??{},i=g?.positionWithImage==="outside",p=i?"gp-flex ":"gp-h-full",o=s(l);return i&&o&&(p+=`${o} `),{...e(p)}},u=(t,r)=>{let{setting:s,style:l}=t,i=s?.positionWithImage==="inside",p=!i&&r?g(i,l,r):"gp-h-full";return{...e(p)}};export{l as getContainerClasses,n as getImageClasses,a as getImageContainerClasses,u as getSubWrapperClass,i as getTextContainerClasses,o as getTextContentClasses,p as getTextWrapperClasses,d as getWrapperClasses};
