handleOpen = () => {
        const triggerRect = resolveElement(triggerElementRef).getBoundingClientRect();
        const tooltipRect = tooltipRef.current.getBoundingClientRect();
        if (tooltipRect.bottom < triggerRect.top) {
            setPos('top');
        } else if (tooltipRect.top > triggerRect.bottom) {
            setPos('bottom');
        } else if (tooltipRect.right < triggerRect.left) {
            setPos('left');
        } else if (tooltipRect.left > triggerRect.right) {
            setPos('right');
        } else {
            setPos('floating');
        }
    }
A Tooltip is a small piece of contextual information about an element on the screen, which is displayed when a user hovers or focuses on the element it is describing.
@category Internal