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