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