import{makeStyleResponsive as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";let 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,l=e?.tablet===void 0?t:e?.tablet,r=e?.mobile===void 0?l:e?.mobile;return{desktop:t,tablet:l,mobile:r}},convertUnitToNumber=(e,t)=>{if(!e)return t;if("number"==typeof e)return e;let l=e.replaceAll("px","").replaceAll("%","").replaceAll("rem","").replaceAll("em","");return isNaN(Number(l))?t:Number(l)},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 l={},r=["desktop","mobile","tablet"];return r.forEach(r=>{l={...l,[`--d${"desktop"===r?"":`-${r}`}`]:`${e(r)?"none":t}`}}),l},getStyleAlignment=(l,r)=>{let o={},n=["desktop","mobile","tablet"];return n.forEach(i=>{o=e("jc",updateAlignStyles(l,n));let p=t(r,i);p?.includes("bottom")&&(o=e("ai",updateAlignStyles(l,n)))}),o},checkAddOverFlowClass=e=>{let t=e?.["--radius"],l=e?.["--bblr"]||"0px",r=e?.["--bbrr"]||"0px",o=e?.["--btlr"]||"0px",n=e?.["--btrr"]||"0px";return t&&!t.toString().includes("none")&&"0"!==t.toString()||"0px"!==l||"0px"!==r||"0px"!==o||"0px"!==n};export{checkAddOverFlowClass,convertSpacing,convertSpacingPx,convertUnitToNumber,getDisplayStyle,getStyleAlignment,getTypeWidthDevice,updateAlignStyles};
