import{makeStyle as t,getGlobalColorResponsiveStyle as e,makeStyleResponsive as r,makeWidth as l,getResponsiveStylePadding as n,composeRadius as o,getStyleBackgroundByDevice as y,getGradientBgrStyleByDevice as i}from"@gem-sdk/core";import{pointerEventStyle as s,getDisplayStyle as S,getWrapperDialogStyle as u,getBorderStyle as g,heightStyle as m,getInnerStyle as p,removeHeightPercentForContent as a}from"./helpers.js";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as c}from"../../common/const.js";import{getWidth as d}from"../../hero-banner/common/helpers.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getWrapperStyle=t=>{let e={"--d":t?.desktop?"contents":"none","--d-tablet":t?.tablet?"contents":"none","--d-mobile":t?.mobile?"contents":"none"};return filterTruthyStyles(e)},getContainStyle=()=>{let t={"z-index":c.DIALOG};return filterTruthyStyles(t)},getBackdropStyle=t=>{let e={...s(t)};return filterTruthyStyles(e)},getOverlayStyle=(r,l,n)=>{let o={...t({op:0==Number(r)?"0":(Number(r)??0)/100}),...e("bgc",{desktop:l}),...S(n)};return filterTruthyStyles(o)},getDialogContentStyle=({style:t,width:e,height:n,fullScreen:o})=>{let y={...u(t),...g(t),...S(t),...r("w",l(e,o)),...m(o,n)};return filterTruthyStyles(y)},getButtonContentStyle=t=>{let{btnBg:l,btnRounded:y,btnColor:i,btnPadding:s,btnWidth:S,btnHeight:u}=t??{},g=S?r("w",d(S)):{},m=u?r("h",d(u)):{},p={...g,...m,...e("c",{desktop:i}),...e("bgc",{desktop:l}),...n(s),...o({normal:y})};return filterTruthyStyles(p)},getSvgContentStyle=t=>{let e={};return t&&(e={"--height-icon":`${t}`}),filterTruthyStyles(e)},getBodyContentStyle=(t,e)=>{let{fullScreen:r,height:l,background:n}=t??{},o={...p(e),...a(m(r,l)),"border-radius":"inherit",...y(n),...i(n,{desktop:!0,tablet:!0,mobile:!0})};return filterTruthyStyles(o)};export{getBackdropStyle,getBodyContentStyle,getButtonContentStyle,getContainStyle,getDialogContentStyle,getOverlayStyle,getSvgContentStyle,getWrapperStyle};
