import{DEVICES as r,getResponsiveValueByScreen as e}from"@gem-sdk/core";import{useRef as t,useEffect as n}from"react";let l=(r,e)=>`--${r}${"desktop"===e?"":`-${e}`}`,c=(t,n)=>{let c={};return r.forEach(r=>{let o=l("mr",r),u=l("mb",r),a=e(t,r);c="vertical"===a?{...c,[u]:n,[o]:"0px"}:{...c,[o]:n,[u]:"0px"}}),c};function o(r){if(!r)return;r=r.replace(/^#/,"");let e=parseInt(r.slice(0,2),16),t=parseInt(r.slice(2,4),16),n=parseInt(r.slice(4,6),16);return .2126*e+.7152*t+.0722*n<128}let u=(r,e)=>{let l=t(null),c=t([]);n(()=>{l.current=r},[r]),n(()=>{null!==c.current&&l.current&&"function"==typeof l.current&&l.current(...c.current),c.current=e},e)};export{o as isColorDark,c as makeStyleGapForLabel,u as useTransition};
