import React from 'react'; import type { ViewStyle } from 'react-native'; import type { AnimatedPressableOptions } from '../provider/context'; import type { AnimatedPressableStyleOptions, BasePressableProps, PressableChildrenCallbackParams, } from './base'; import { BasePressable } from './base'; export type { AnimatedPressableOptions, AnimatedPressableStyleOptions, PressableChildrenCallbackParams, }; export type CustomPressableProps = Omit< BasePressableProps, 'animatedStyle' >; const withAnimatedTapStyle = ( WrappedComponent: React.ComponentType>, animatedStyle: ( progress: number, options: AnimatedPressableStyleOptions ) => ViewStyle ) => { return (props: CustomPressableProps) => { return ; }; }; export const createAnimatedPressable = ( animatedStyle: ( progress: number, options: AnimatedPressableStyleOptions ) => ViewStyle ) => { return withAnimatedTapStyle( BasePressable as React.ComponentType>, animatedStyle ); };