import React, { PureComponent } from 'react'; import { LayoutChangeEvent, NativeEventSubscription, ViewStyle, EasingFunction } from 'react-native'; import { ModalStyles } from './styles'; import { WithThemeStyles } from '../theme'; import { FadeAnimated, SlideAnimated } from '../Common/Animation'; import confirm from './confirm'; import info from './info'; interface ModalState { visible: boolean; } declare type AnimationType = 'fade' | 'fade-scale' | 'slide-up' | 'slide-down'; export interface ModalProps extends WithThemeStyles { style?: ViewStyle; children?: React.ReactNode; transparent?: boolean; animationType?: AnimationType; animationDuration?: number; animationEasingFunction?: EasingFunction; title?: React.ReactNode | string; maskClickable?: boolean; showConfirm?: boolean; showCancel?: boolean; onOk?: () => boolean | void | Promise; onCancel?: () => void; onClose?: () => void; onShow?: () => void; onRequestClose?: () => boolean; okText?: string; cancelText?: string; contentStyle?: ViewStyle; needOutAnimation?: boolean; visible: boolean; enableBackHandler?: boolean; okDisabled?: boolean; typeName?: string; } declare class BaseModal extends PureComponent { static defaultProps: Partial; static confirm: typeof confirm; static info: typeof info; animated: FadeAnimated | SlideAnimated; currentViewHeight: number; backHandler: NativeEventSubscription | null; isFirstShow: boolean; constructor(props: ModalProps); componentDidMount(): void; UNSAFE_componentWillReceiveProps(nextProps: ModalProps): void; componentDidUpdate(_prevProps: ModalProps, prevState: ModalState): void; componentWillUnmount(): void; _setInitTranslateY(): void; _contentLayout(e: LayoutChangeEvent): void; _onMaskClick: () => void; onConfirm: () => void; onCancel: () => void; hardwareBackPressHandle: () => boolean; hide(): Promise; calculateContentStyle(): { container: {}; content: {}; }; renderTitle(style: ModalStyles): JSX.Element | null; renderButtons(style: ModalStyles): JSX.Element | null; render(): JSX.Element | null; } export default BaseModal;