import * as React from 'react'; import { useState, useRef} from 'react'; import { Platform, View, Text, Image, TouchableOpacity, ScrollView, StyleSheet, TextInput, Modal, ActivityIndicator, Alert } from 'react-native' import { Button, Icon, Divider, Input } from 'react-native-elements' import { Actionsheet } from 'native-base'; import { dateFormater } from '../utils/date'; import { closeModal } from '../redux/actions/AlertActions'; import { useDispatch } from 'react-redux'; import DateTimePicker from '@react-native-community/datetimepicker'; import DateTimePickerModal from "react-native-modal-datetime-picker"; import DatePicker from "react-native-date-picker"; import MonthPicker from 'react-native-month-year-picker'; import moment from 'moment'; import Theme from './theme.style.js'; import Assets from './assets.manager.js'; import CustomIcon from './icons.js'; var styles = StyleSheet.create({ column: { flexDirection: 'column', alignItems: 'flex-start', width: '100%', padding: 15 }, row: { flexDirection: 'row', alignItems: 'flex-start', flexWrap: 'wrap', flex: 1, padding: 5, fontSize: 16, }, bullet: { width: 10 }, bulletText: { flex: 1, color: 'rgba(0, 0, 0, 0.7)' }, boldText: { fontWeight: 'bold' }, normalText: { color: 'rgba(0, 0, 0, 0.7)' }, container: { flex: 1, backgroundColor: 'blue', flexDirection: 'row', flexWrap: 'wrap' }, item: { backgroundColor: 'orange', width: Theme.screen.w / 2, height: Theme.screen.h / 2, margin: 5 }, image: { width: Theme.screen.w / 2, height: Theme.screen.h / 2 }, centeredView: { flex: 1, justifyContent: "center", alignItems: "center", backgroundColor: '#00000090', padding: 30 }, bottomView: { flex: 1, justifyContent: "flex-end", alignItems: "center", backgroundColor: '#00000090', padding: 0 }, modalView: { backgroundColor: '#fff', padding: 20 }, modalTitle: { padding: 5, fontSize: 18, fontWeight: 'bold' }, modalText: { padding: 5, fontSize: 16, color: 'gray', marginTop: 10 }, }); const ModalDialogContainer = (props) => { const Content = props.content; return ( ) } const ul = function(props){ const [drop, setdrop] = useState(false); const renderlist = (dataset) => { return dataset.map((data, index) => { return ( {'\u2022' + " "} {data.label} ) }) } return ( {setdrop(!drop)}}> {props.title} {drop ? {renderlist(props.list || [])} : null} ) } const product = function(props){ return ( {props.title} ) } const loyaltycard = function(props){ return ( {props.title} ) } const card = function(props){ let h = props.height ? props.height : 130 return ( {props.title} ) } const button = function(props){ return (