import * as React from 'react';
import {
Dimensions,
View,
LayoutChangeEvent,
StyleSheet,
Platform,
} from 'react-native';
import type { ThemeProp } from 'src/types';
import { useInternalTheme } from '../../core/theming';
import { addEventListener } from '../../utils/addEventListener';
import Portal from '../Portal/Portal';
import Text from '../Typography/Text';
import { getTooltipPosition, Measurement } from './utils';
export type Props = {
/**
* Tooltip reference element. Needs to be able to hold a ref.
*/
children: React.ReactElement;
/**
* The number of milliseconds a user must touch the element before showing the tooltip.
*/
enterTouchDelay?: number;
/**
* The number of milliseconds after the user stops touching an element before hiding the tooltip.
*/
leaveTouchDelay?: number;
/**
* Tooltip title
*/
title: string;
/**
* @optional
*/
theme?: ThemeProp;
};
/**
* Tooltips display informative text when users hover over, focus on, or tap an element.
*
* Plain tooltips, when activated, display a text label identifying an element, such as a description of its function. Tooltips should include only short, descriptive text and avoid restating visible UI text.
*
*