"use strict";var e=require("@gem-sdk/core");const t=(e,t)=>(t?.forEach(t=>{e?.[t]=="flex-start"?e={...e,[t]:"start"}:e?.[t]=="flex-end"&&(e={...e,[t]:"end"})}),e),r=(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)};exports.checkAddOverFlowClass=e=>{let t=e?.["--radius"],r=e?.["--bblr"]||"0px",l=e?.["--bbrr"]||"0px",o=e?.["--btlr"]||"0px",p=e?.["--btrr"]||"0px";return t&&!t.toString().includes("none")&&"0"!==t.toString()||"0px"!==r||"0px"!==l||"0px"!==o||"0px"!==p},exports.convertSpacing=e=>e?{desktop:r(e.desktop,5),tablet:r(e.tablet,5),mobile:r(e.mobile,5)}:{desktop:5},exports.convertSpacingPx=e=>e?{desktop:`${r(e.desktop,5)}px`,tablet:`${r(e.tablet,5)}px`,mobile:`${r(e.mobile,5)}px`}:{desktop:"5px"},exports.convertUnitToNumber=r,exports.getDisplayStyle=(e,t)=>{let r={};return["desktop","mobile","tablet"].forEach(l=>{r={...r,[`--d${"desktop"===l?"":`-${l}`}`]:`${e(l)?"none":t}`}}),r},exports.getStyleAlignment=(r,l)=>{let o={},p=["desktop","mobile","tablet"];return p.forEach(s=>{o=e.makeStyleResponsive("jc",t(r,p));let i=e.getResponsiveValueByScreen(l,s);i?.includes("bottom")&&(o=e.makeStyleResponsive("ai",t(r,p)))}),o},exports.getTypeWidthDevice=e=>{let t=e?.desktop,r=e?.tablet===void 0?t:e?.tablet,l=e?.mobile===void 0?r:e?.mobile;return{desktop:t,tablet:r,mobile:l}},exports.updateAlignStyles=t;
