"use strict";var core=require("@gem-sdk/core");const updateAlignStyles=(e,t)=>(t?.forEach(t=>{e?.[t]=="flex-start"?e={...e,[t]:"start"}:e?.[t]=="flex-end"&&(e={...e,[t]:"end"})}),e),getTypeWidthDevice=e=>{let t=e?.desktop,r=e?.tablet===void 0?t:e?.tablet,o=e?.mobile===void 0?r:e?.mobile;return{desktop:t,tablet:r,mobile:o}},convertUnitToNumber=(e,t)=>{if(!e)return t;if("number"==typeof e)return e;let r=e.replaceAll("px","").replaceAll("%","").replaceAll("rem","").replaceAll("em","");return isNaN(Number(r))?t:Number(r)},convertSpacing=e=>e?{desktop:convertUnitToNumber(e.desktop,5),tablet:convertUnitToNumber(e.tablet,5),mobile:convertUnitToNumber(e.mobile,5)}:{desktop:5},convertSpacingPx=e=>e?{desktop:`${convertUnitToNumber(e.desktop,5)}px`,tablet:`${convertUnitToNumber(e.tablet,5)}px`,mobile:`${convertUnitToNumber(e.mobile,5)}px`}:{desktop:"5px"},getDisplayStyle=(e,t)=>{let r={},o=["desktop","mobile","tablet"];return o.forEach(o=>{r={...r,[`--d${"desktop"===o?"":`-${o}`}`]:`${e(o)?"none":t}`}}),r},getStyleAlignment=(e,t)=>{let r={},o=["desktop","mobile","tablet"];return o.forEach(l=>{r=core.makeStyleResponsive("jc",updateAlignStyles(e,o));let n=core.getResponsiveValueByScreen(t,l);n?.includes("bottom")&&(r=core.makeStyleResponsive("ai",updateAlignStyles(e,o)))}),r},checkAddOverFlowClass=e=>{let t=e?.["--radius"],r=e?.["--bblr"]||"0px",o=e?.["--bbrr"]||"0px",l=e?.["--btlr"]||"0px",n=e?.["--btrr"]||"0px";return t&&!t.toString().includes("none")&&"0"!==t.toString()||"0px"!==r||"0px"!==o||"0px"!==l||"0px"!==n};exports.checkAddOverFlowClass=checkAddOverFlowClass,exports.convertSpacing=convertSpacing,exports.convertSpacingPx=convertSpacingPx,exports.convertUnitToNumber=convertUnitToNumber,exports.getDisplayStyle=getDisplayStyle,exports.getStyleAlignment=getStyleAlignment,exports.getTypeWidthDevice=getTypeWidthDevice,exports.updateAlignStyles=updateAlignStyles;
