import React from 'react'; import { View, StyleSheet, Text, Image, Dimensions } from 'react-native'; import { Fonts } from '../../styles'; import { useColors } from '../../themes'; import Button from '../Button'; import { EmptyStatePropsType } from './types'; const EmptyState = (props: EmptyStatePropsType) => { const { topSection, middleSection, bottomSection } = props; const Colors = useColors(); const fontColor = middleSection?.fontColor ? middleSection.fontColor : Colors.font_1; const styles = StyleSheet.create({ topSection: { marginTop: 30, // marginTop: 20, }, bottomSection: { margin: 0 }, bottomSectionBorder: { marginTop: 15, borderStyle: 'dotted', borderRadius: 1, borderWidth: 1, borderColor: 'grey', }, mainView: { backgroundColor: middleSection?.backgroundColor, height: Dimensions.get('screen').height, }, titleText: { fontSize: Fonts.size.h5, color: fontColor, textAlign: 'center', fontWeight: 'bold', }, supplementaryText: { fontSize: Fonts.size.medium_15, color: fontColor, padding: 10, textAlign: 'center', }, singleButton: { backgroundColor: Colors.transparent, borderWidth: 0, marginTop: 30, }, bottomButton: { backgroundColor: Colors.transparent, borderWidth: 0, fontSize: Fonts.size.mini, }, splashScreen: { width: Dimensions.get('screen').width * 0.35, height: Dimensions.get('screen').height * 0.25, }, imageContainer: { marginTop: 85, justifyContent: 'center', alignItems: 'center', marginBottom: 70, }, bottomFlexContainer: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', }, bottomLeftText: { flex: 1.5, flexDirection: 'row', justifyContent: 'flex-start', margin: 13, fontSize: Fonts.size.medium_15, color: Colors.font_1, fontWeight: 'bold', }, bottomRightText: { flex: 1, flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center', textAlign: 'right', margin: 13, fontSize: Fonts.size.medium_15, fontWeight: 'bold', }, }); return ( {topSection?.exists ? ( {topSection.titleText} {' '} {topSection.supplementaryText}{' '} ) : ( )} {middleSection?.exists ? ( {middleSection?.titleText ? ( {middleSection?.titleText} ) : ( )} {middleSection?.supplementaryText ? ( {' '} {middleSection?.supplementaryText}{' '} ) : ( )} {middleSection?.buttonLabel ? (