import type { ComponentProps, ReactNode, Ref } from 'react'; import type { Insets, PressableProps, View, ViewStyle } from 'react-native'; import type { DerivedValue, SharedValue } from 'react-native-reanimated'; import type { MotiView } from '../../components/view'; import type { MotiAnimationProp, MotiTransition } from '../../core/types'; // biome-ignore lint/style/useExportsLast: MotiPressableInteractionState is a public type that the private Interactable helper depends on — reversing the order would harm readability export type MotiPressableInteractionState = { hovered: boolean; pressed: boolean }; type Interactable = (interaction: MotiPressableInteractionState) => NonNullable; type InteractableProp = Interactable | T; export type AnimateProp = MotiAnimationProp; export type MotiPressableInteractionProp = Interactable; export type MotiPressableTransitionProp = InteractableProp; export type MotiPressableProp = InteractableProp; export type MotiPressableProps = { ref?: Ref; onFocus?: () => void; onBlur?: () => void; transition?: MotiPressableTransitionProp; animate?: MotiPressableProp; onPress?: () => void; onPressIn?: () => void; onPressOut?: () => void; onHoverIn?: () => void; onHoverOut?: () => void; onKeyDown?: (e: KeyboardEvent) => void; onKeyUp?: (e: KeyboardEvent) => void; onLongPress?: () => void; hitSlop?: Insets; /** Optional unique ID to identify this interaction container. */ id?: string; disabled?: boolean; containerStyle?: ViewStyle; dangerouslySilenceDuplicateIdsWarning?: boolean; pressedValue?: SharedValue; hoveredValue?: SharedValue; onContainerLayout?: PressableProps['onLayout']; href?: string; testID?: PressableProps['testID']; children?: ReactNode | ((interaction: DerivedValue) => ReactNode); } & Pick, 'exit' | 'from' | 'exitTransition' | 'style' | 'onLayout'> & Pick< PressableProps, | 'accessibilityActions' | 'accessibilityElementsHidden' | 'accessibilityHint' | 'accessibilityIgnoresInvertColors' | 'accessibilityLabel' | 'accessibilityLiveRegion' | 'accessibilityRole' | 'accessibilityState' | 'accessibilityValue' | 'accessibilityViewIsModal' | 'accessible' | 'onAccessibilityTap' | 'onAccessibilityAction' | 'onAccessibilityEscape' | 'importantForAccessibility' >;