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