import { RefObject } from 'react'; export const getIsRtl = (ref?: RefObject) => { return typeof window !== 'undefined' && ref?.current ? getComputedStyle(ref.current as Element)?.direction === 'rtl' : false; };