import React from 'react'; import {Image, Text, StyleSheet, View} from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import { UP_TO_DATE, NO_NEW_NOTIFICATIONS, FIRST_MESSAGE, START_CHATTING, } from '../../constants/strings'; import {NOTIFICATION_GRADIENT} from '../../constants/constants'; import {SCREEN_HEIGHT, normalize, SCREEN_WIDTH} from '../../utils'; import {EmptyViewProps} from '../../types/index'; const EmptyContentView: React.FC = ({viewType}) => { const _getNotificationImage = () => { return ( ); }; const _getChatImage = () => { return ( ); }; const _getImageForType = () => { switch (viewType) { case 'Notification': return _getNotificationImage(); case 'ChatList': return _getChatImage(); } }; const _getTextForNotification = () => { return ( <> {UP_TO_DATE} {NO_NEW_NOTIFICATIONS} ); }; const _getTextForChat = () => { return ( {START_CHATTING} {FIRST_MESSAGE} ); }; const _getTextForType = () => { switch (viewType) { case 'Notification': return _getTextForNotification(); case 'ChatList': return _getTextForChat(); } }; return ( {_getImageForType()} {_getTextForType()} ); }; const styles = StyleSheet.create({ container: { flex: 1, flexDirection: 'column', justifyContent: 'center', alignItems: 'center', }, topMargin: { marginTop: SCREEN_HEIGHT * 0.025, paddingBottom: '5%', }, upperTextStyle: { textAlign: 'center', fontWeight: '700', fontSize: normalize(23), lineHeight: normalize(40), }, chatTextStyles: { width: '85%', }, bottomTextStyle: { textAlign: 'center', color: '#808080', fontWeight: '600', fontSize: normalize(20), lineHeight: normalize(30), }, imageStyles: { width: SCREEN_WIDTH * 0.72, height: SCREEN_WIDTH * 0.72, }, backgroundLinearView: { borderRadius: (SCREEN_WIDTH * 0.72) / 2, }, }); export default EmptyContentView;