import {memo, PropsWithChildren} from 'react';
import {StyleProp, View, ViewStyle} from 'react-native';

interface Props {
  style?: StyleProp<ViewStyle>;
}

// Android: plain View — no gesture interception needed (handled by GestureDetector)
const RNGesturePressableNoDoubleTapComponent = ({
  children,
  style,
}: PropsWithChildren<Props>) => {
  if (!style) {
    return <>{children}</>;
  }

  return <View style={style}>{children}</View>;
};

export default memo(RNGesturePressableNoDoubleTapComponent);
