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