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