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