import { BaseGesture } from '../../handlers/gestures/gesture'; import { ComposedGesture } from '../../handlers/gestures/gestureComposition'; import type { GestureDetectorProps as LegacyGestureDetectorProps } from '../../handlers/gestures/GestureDetector'; import { GestureDetector as LegacyGestureDetector } from '../../handlers/gestures/GestureDetector'; import type { NativeDetectorProps } from './common'; import { NativeDetector } from './NativeDetector'; import { useEnsureGestureHandlerRootView } from './useEnsureGestureHandlerRootView'; export function GestureDetector< TConfig, THandlerData, TExtendedHandlerData extends THandlerData, >( props: | NativeDetectorProps | LegacyGestureDetectorProps ) { useEnsureGestureHandlerRootView(); if ( props.gesture instanceof ComposedGesture || props.gesture instanceof BaseGesture ) { return ; } return ( )} /> ); }