"use strict";var e=require("@gem-sdk/core"),t=require("./helpers.js"),o=require("../../helpers.js"),r=require("../settings/configs/translate.js");function a(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}exports.getContainerStyle=(t,o)=>{let{tagWidth:r}=o??{},l={...e.makeStyleResponsive("jc",t?.align),...r};return a(l)},exports.getStyle=(t,o)=>{let r={...e.makeStyle({mr:t?.spacing,mb:t?.spacing}),...e.makeStyleResponsive("ta",t?.align),...o,"--dynamic-source-color":"#F4F4F4"};return a(r)},exports.getTextStyle=({styles:l,setting:i,builderProps:s,pageContext:n,type:d="React"})=>{let p=i?.background;"Liquid"===d&&(p=o.getBackgroundTranslated({background:p,uid:s?.uid,enableTranslate:!!r.Text?.background?.id,pageContext:n,isTranslateVideo:!1}));let c=e.makeGlobalSize(i?.globalSize),y=[l?.lineThrough&&"line-through",l?.typo?.attrs?.underline&&"underline"].filter(Boolean),g={...c?.width?.["--w"]?c.width:{"--w":"100%"},...e.makeStyle({tdc:e.getSingleColorVariable(l?.lineColor?.normal),tdt:t.formatThickness(l?.thickness)}),...e.composeBorderResponsive(l?.shapeBorder),...e.composeRadiusResponsive(l?.shapeRounded),...e.getResponsiveStyleShadowWithoutState(l?.shapeBoxShadow,"box-shadow",l?.shapeBoxShadow),...e.getStyleShadow({value:l?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:l?.typo?.custom?.hasShadowText}),...e.makeStyleResponsive("ta",l?.textAlign),...e.makeStyleResponsive("line-clamp",e.makeLineClamp(l?.lineClamp,l?.hasLineClamp)),...l?.textColor?e.getGlobalColorStyle(l.textColor):e.getGlobalColorStateStyle("c",l?.color),...e.composeTypographyStyle(l?.typo,l?.typography),"word-break":"break-word",...e.getStyleBackgroundByDevice(p),...c.padding,...e.getGradientBgrStyleByDevice(p,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...l?.opacityPrice&&{opacity:`${l?.opacityPrice}%`},...e.makeStyle({tdl:y.join(" ")})};return l?.enableHoverEffect?a(g):e.filterHoverVariables(g)},exports.getTextStyleInline=t=>{let o={...e.composeTypographyStyle(t?.typo),"word-break":"break-word",overflow:"hidden"};return a(o)};
