"use strict";var core=require("@gem-sdk/core");const getImageAttr=({setting:t})=>({src:t?.image?.src,alt:t?.image?.alt,loading:"lazy"}),getContainerAttrs=t=>{let{builderAttrs:e,builderProps:r}=t;return{...e,"data-id":r?.uid||"",id:`g-product-badge-${r?.uid}`,"gp-data-hidden":"false"}},getEditTooltipAttrs=(t,e)=>{let{setting:r}=t,o=r?.positionWithImage==="outside";return{enable:!0,text:e&&core.t("Not be displayed when published"),position:o?"bottom":"right",width:"205px"}},getSubWrapperAttrs=(t,e)=>{let{builderProps:r}=t,o=e?e?.baseID?.replace("gid://shopify/Product/",""):"";return{"data-product-id":o||"",id:r?.uid||""}},getTextContentAttrs=()=>({id:"product-badge-content"});exports.getContainerAttrs=getContainerAttrs,exports.getEditTooltipAttrs=getEditTooltipAttrs,exports.getImageAttr=getImageAttr,exports.getSubWrapperAttrs=getSubWrapperAttrs,exports.getTextContentAttrs=getTextContentAttrs;
