"use strict";var helpers=require("../../../common/helpers.js"),core=require("@gem-sdk/core");const composeStyles=e=>helpers.filterTruthy(e),composeContainerStyles=(e,o)=>{let{align:t}=e??{},{pos:r,d:s,op:a,right:c,top:l,left:i,bottom:n,z:y,margin:S,padding:g}=o??{},p=o?.["spacing-setting"],h=core.composeAdvanceStyle({pos:r,d:s,op:a,right:c,top:l,left:i,bottom:n,z:y,margin:S,padding:g,"spacing-setting":p});return composeStyles({...h,...core.makeStyleResponsive("ta",t)})},composeInnerStyles=(e,o,t)=>{let{border:r,rounded:s,hasBoxShadow:a,boxShadow:c}=o??{},{wrapperBorder:l,borderRadius:i,globalSize:n,boxShadowEmailHover:y,boxShadowEmailActive:S,roundedEmailHover:g,textColorActive:p,roundedEmailActive:h,textColorHover:d,borderEmailHover:u,borderEmailActive:v,backgroundColorV2Active:m,backgroundColorV2Hover:b}=t??{},{typography:w,size:T,background:$}=e??{},f=core.composeAdvanceStyle({border:r,rounded:s,hasBoxShadow:a,boxShadow:c}),k=core.composeTypographyStyle(e?.typo,w),x=core.makeGlobalSize(n);return composeStyles({...x?.width?.["--w"]?x.width:{"--w":"auto"},...x?.height?.["--h"]?x.height:{"--h":"auto"},...x.padding,...k,...T?.type?{}:core.composeSize(T?.custom),...core.getBorderStyle(l),...core.getBorderRadiusStyle(i),...f,...core.getStyleShadow({value:c,styleAppliedFor:"box-shadow",isEnableShadow:a}),...core.getStyleBackgroundByDevice($),...core.getGradientBgrStyleByDevice($),...core.getStyleShadow({value:S?.active,state:"focus",styleAppliedFor:"box-shadow",isEnableShadow:!0}),...core.getStyleShadow({value:y?.hover,state:"hover",styleAppliedFor:"box-shadow",isEnableShadow:!0}),"--hvr-c":d?.hover??"","--focus-c":p?.active??"",...generateStylesTarget({state:"hover",borderStyle:u?.hover,background:b?.hover,radius:g?.hover}),...generateStylesTarget({state:"focus",borderStyle:v?.active,background:m?.active,radius:h?.active})})},generateStylesTarget=({state:e,borderStyle:o,background:t,radius:r})=>{let{border:s,width:a,color:c}=o??{},l={hover:"hvr",focus:"focus"}[e];return{...a&&{[`--${l}-bw`]:`${a}`},...s&&{[`--${l}-b`]:`${s} ${core.getSingleColorVariable(c)}`},...t&&{[`--${l}-bgc`]:`${core.getSingleColorVariable(t)}`},...core.getCustomRadius(e,r)}};exports.composeContainerStyles=composeContainerStyles,exports.composeInnerStyles=composeInnerStyles,exports.generateStylesTarget=generateStylesTarget;
