/* eslint-disable react-native/no-inline-styles */ import React from 'react'; import { Modal, ModalProps, NativeSyntheticEvent, Pressable, View, } from 'react-native'; import { SafeAreaProvider, SafeAreaView, } from 'react-native-safe-area-context'; import { ICountrySelectStyle } from '../../interface'; interface PopupModalProps extends ModalProps { visible: boolean; onRequestClose: (event: NativeSyntheticEvent) => void; statusBarTranslucent?: boolean; removedBackdrop?: boolean; disabledBackdropPress?: boolean; onBackdropPress?: (closeModal: () => void) => void; accessibilityLabelBackdrop?: string; accessibilityHintBackdrop?: string; styles: ICountrySelectStyle; countrySelectStyle?: ICountrySelectStyle; header?: React.ReactNode; children: React.ReactNode; } export const PopupModal: React.FC = ({ visible, onRequestClose, statusBarTranslucent, removedBackdrop, disabledBackdropPress, onBackdropPress, accessibilityLabelBackdrop, accessibilityHintBackdrop, styles, countrySelectStyle, header, children, ...props }) => { return ( onBackdropPress(() => onRequestClose( {} as NativeSyntheticEvent ) ) : onRequestClose } /> {header} {children} ); };