import * as React from "react"; import { Animated, PanResponderGestureState, PanResponderInstance, StyleProp, ViewStyle, ViewProps } from "react-native"; import { Animation, CustomAnimation } from "react-native-animatable"; import { Direction, Orientation, OrNull, PresentationStyle, OnOrientationChange } from "./types"; export declare type OnSwipeCompleteParams = { swipingDirection: Direction; }; declare type State = { showContent: boolean; isVisible: boolean; deviceWidth: number; deviceHeight: number; isSwipeable: boolean; pan: OrNull; }; export interface ModalProps extends ViewProps { children: React.ReactNode; onSwipeStart?: () => void; onSwipeMove?: (percentageShown: number) => void; onSwipeComplete?: (params: OnSwipeCompleteParams) => void; onSwipeCancel?: () => void; style?: StyleProp; swipeDirection?: Direction | Array; onDismiss?: () => void; onShow?: () => void; hardwareAccelerated?: boolean; onOrientationChange?: OnOrientationChange; presentationStyle?: PresentationStyle; animationIn: Animation | CustomAnimation; animationInTiming: number; animationOut: Animation | CustomAnimation; animationOutTiming: number; avoidKeyboard: boolean; coverScreen: boolean; hasBackdrop: boolean; backdropColor: string; backdropOpacity: number; backdropTransitionInTiming: number; backdropTransitionOutTiming: number; customBackdrop: React.ReactNode; useNativeDriver: boolean; useNativeDriverForBackdrop?: boolean; deviceHeight: number; deviceWidth: number; hideModalContentWhileAnimating: boolean; propagateSwipe: boolean; isVisible: boolean; onModalShow: () => void; onModalWillShow: () => void; onModalHide: () => void; onModalWillHide: () => void; onBackButtonPress: () => void; onBackdropPress: () => void; swipeThreshold: number; scrollTo: OrNull<(e: any) => void>; scrollOffset: number; scrollOffsetMax: number; scrollHorizontal: boolean; statusBarTranslucent?: boolean; supportedOrientations?: Orientation[]; } export declare class ReactNativeModal extends React.Component { static defaultProps: { animationIn: string; animationInTiming: number; animationOut: string; animationOutTiming: number; avoidKeyboard: boolean; coverScreen: boolean; hasBackdrop: boolean; backdropColor: string; backdropOpacity: number; backdropTransitionInTiming: number; backdropTransitionOutTiming: number; customBackdrop: any; useNativeDriver: boolean; deviceHeight: any; deviceWidth: any; hideModalContentWhileAnimating: boolean; propagateSwipe: boolean; isVisible: boolean; onModalShow: () => any; onModalWillShow: () => any; onModalHide: () => any; onModalWillHide: () => any; onBackdropPress: () => any; onBackButtonPress: () => any; swipeThreshold: number; scrollTo: any; scrollOffset: number; scrollOffsetMax: number; scrollHorizontal: boolean; supportedOrientations: string[]; }; state: State; isTransitioning: boolean; inSwipeClosingState: boolean; currentSwipingDirection: OrNull; animationIn: string; animationOut: string; backdropRef: any; contentRef: any; panResponder: OrNull; constructor(props: ModalProps); static getDerivedStateFromProps(nextProps: ModalProps, state: State): { isVisible: boolean; showContent: boolean; }; componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(prevProps: ModalProps): void; getDeviceHeight: () => number; getDeviceWidth: () => number; buildPanResponder: () => void; getAccDistancePerDirection: (gestureState: PanResponderGestureState) => number; getSwipingDirection: (gestureState: PanResponderGestureState) => "left" | "right" | "up" | "down"; calcDistancePercentage: (gestureState: PanResponderGestureState) => number; createAnimationEventForSwipe: () => (...args: any[]) => void; isDirectionIncluded: (direction: Direction) => boolean; isSwipeDirectionAllowed: ({ dy, dx }: PanResponderGestureState) => boolean; handleDimensionsUpdate: () => void; open: () => void; close: () => void; makeBackdrop: () => JSX.Element; render(): JSX.Element; } export default ReactNativeModal;