import{makeStyle as t,getGlobalColorResponsiveStyle as e,makeStyleResponsive as r,makeWidth as n,getResponsiveStylePadding as o,composeRadius as l,getStyleBackgroundByDevice as i,getGradientBgrStyleByDevice as s}from"@gem-sdk/core";import{pointerEventStyle as y,getDisplayStyle as a,getWrapperDialogStyle as g,getBorderStyle as m,heightStyle as u,getInnerStyle as S,removeHeightPercentForContent as p}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";import{getBackgroundTranslated as f}from"../../helpers.js";import{Dialog as h}from"../settings/configs/translate.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={...y(t)};return filterTruthyStyles(e)},getOverlayStyle=(r,n,o)=>{let l={...t({op:0==Number(r)?"0":(Number(r)??0)/100}),...e("bgc",{desktop:n}),...a(o)};return filterTruthyStyles(l)},getDialogContentStyle=({style:t,width:e,height:o,fullScreen:l})=>{let i={...g(t),...m(t),...a(t),...r("w",n(e,l)),...u(l,o)};return filterTruthyStyles(i)},getButtonContentStyle=t=>{let{btnBg:n,btnRounded:i,btnColor:s,btnPadding:y,btnWidth:a,btnHeight:g}=t??{},m=a?r("w",d(a)):{},u=g?r("h",d(g)):{},S={...m,...u,...e("c",{desktop:s}),...e("bgc",{desktop:n}),...o(y),...l({normal:i})};return filterTruthyStyles(S)},getSvgContentStyle=t=>{let e={};return t&&(e={"--height-icon":`${t}`}),filterTruthyStyles(e)},getBodyContentStyle=({setting:t,style:e,uid:r,pageContext:n,type:o="React"})=>{let{fullScreen:l,height:y,background:a}=t??{},g="Liquid"===o?f({background:a,uid:r,enableTranslate:!!h?.background?.id,pageContext:n,isTranslateVideo:!1}):a,m={...S(e),...p(u(l,y)),"border-radius":"inherit",...i(g),...s(g,{desktop:!0,tablet:!0,mobile:!0})};return filterTruthyStyles(m)};export{getBackdropStyle,getBodyContentStyle,getButtonContentStyle,getContainStyle,getDialogContentStyle,getOverlayStyle,getSvgContentStyle,getWrapperStyle};
