import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDefault as r,getWidthByShapeGlobalSize as o,getStyleShadow as l,getStyleBgColor as n,getRadiusStyleActiveState as a,makeStyle as i,getSingleColorVariable as c,makeStyleState as g,getGlobalColorStateStyle as b,getResponsiveStylePadding as p,getStyleBackgroundByDevice as s,getValueByDevice as d,DEVICES as u,getResponsiveValueByScreen as m}from"@gem-sdk/core";import{getVisibilityStyle as h,getStyleAspectRatioHeroBannerCustom as f,getOpacityHover as w,getDisplayStyleByFitContent as y,getAttachmentDevice as v,formatHoverScale as S,getStyleHeroBannerBg as k,getClipPath as j,opacityEnabledData as $,getResponsiveSetting as A}from"./helpers.js";function B(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>void 0!==e||""===e))}let O=(l,n,a)=>{let{sizeSetting:i}=l??{},c={...a,...h(a),...r("w",o(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...e("h",t(i))};return B(c)},E=r=>{let{sizeSetting:o,background:g,borderBg:b,cornerBg:p,shadowBg:s,hasActiveShadow:d}=r??{},u={...e("h",t(o)),...f(g,o),...i({bs:b?.border??b?.border,bw:b?.width??b?.width,bc:c(b?.color)}),...a({...p,active:{...p||{},radiusType:"custom"}}),...g?{...n(g)}:{},...l({value:s,styleAppliedFor:"box-shadow",isEnableShadow:d})};return B(u)},I=e=>{let{overlayColor:t,overlayOpacity:r,hoverEffect:o}=e??{},{disableOpacity:l}=$(e),n="number"!=typeof r?.normal||isNaN(r?.normal)?"string"==typeof r?.normal?`${parseInt(r?.normal)}%`:"0%":`${r?.normal}%`,a=g("op",{normal:n,hover:w(e)}),i=b("bgc",{...t,hover:t?.hover||t?.normal});l&&(delete i?.["--bgc"],delete a?.["--op"]),o||(delete i?.["--hvr-bgc"],delete a?.["--hvr-op"]);let c={...i,...a,"--top":"0","--left":"0"};return B(c)},x=e=>{let{contentPadding:t}=e??{},r={...p(t)};return B(r)},C=l=>{let{sizeSetting:n,background:a}=l??{},i={...y(n,a),...e("h",t(n)),...r("w",o(n,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"})};return B(i)},F=(t,r,o)=>{let{hoverEffectScale:l,background:n,hoverEffectDuration:a}=t??{},i=`${parseFloat(`${a}`)??.5}s`,c={...k(A(n||{}),r),...s(n,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":i,"--scale":S(l),...e("pos",v(n)),transform:o,transition:`transform ${i} cubic-bezier(0,0,0,1)`};return B(c)},N=e=>{let{borderBg:t,cornerBg:r}=e??{},o={"clip-path":j(t?.width,r)};return B(o)},z=e=>{if(e)return{desktop:d(e,"desktop"),tablet:d(e,"tablet"),mobile:d(e,"mobile")}},H=e=>{if(!e)return;let t={};return u.forEach(r=>{let o=m(e,r),l=o?.videoAlign;t[r]=l||"top"}),Object.keys(t).length>0?t:void 0},R=(t,r,o)=>{let l=z(r),n=H(o),a={...e("aspect",t),...l?e("objf",l):{},...n?e("objp",n):{}};return B(a)},T=(t,r)=>{let o=z(r),l={...e("aspect",t),...o?e("objf",o):{},"pointer-events":"none"};return B(l)};export{C as getAdaptiveStyle,F as getBackgroundStyle,N as getContainBackgroundStyle,E as getContainerStyle,R as getHtml5VideoStyle,I as getOverlayStyle,x as getRowStyle,O as getStyle,T as getYoutubeIframeStyle};
