import React, { useState } from 'react';
import { Modal, View, Text, Pressable, StyleSheet } from 'react-native';
import { ElevationObject } from '../../components/Button';
import TextView from '../../components/TextView';
import utils from '../../utils/utils';
const DialogIdleFee = ({
idleFeeConfig
}) => {
const [visible, showModal] = useState(false)
return (
<>
showModal(true)}>
This site has idle fees enabled.
Idle Fees
{ utils.isNotEmpty(idleFeeConfig.repeatDay) && <>
Effective Days:
{utils.join(idleFeeConfig.repeatDay, ", ")}
>
}
Effective Timeļ¼
{ idleFeeConfig.allDay
? All day
: (utils.isNotEmpty(idleFeeConfig.startTime) && utils.isNotEmpty(idleFeeConfig.endTime)) &&
{idleFeeConfig.startTime + " - " + idleFeeConfig.endTime}
}
{ utils.isNotEmpty(idleFeeConfig.idleGracePeriod) &&
<>
Grace Period:
{idleFeeConfig.idleGracePeriod} min
>
}
Charging Rate:
{idleFeeConfig.idleFee}/{idleFeeConfig.idleInterval} min
{ utils.isNotEmpty(idleFeeConfig.idleFeeCap) &&
<>
Idle Fee Cap:
{idleFeeConfig.idleFeeCap}
>
}
{/* {
"Grace Period of " + idleFeeConfig.idleGracePeriod + " Minutes. Rates are" + idleFeeConfig.idleFee + " per " + idleFeeConfig.idleInterval + " Min. Idle Fee is capped at " + idleFeeConfig.idleFeeCap
} */}
>
)};
const B = ({children}) => {
return {children}
}
export default DialogIdleFee;
const styles = StyleSheet.create({
cardView: {
padding: 12,
borderRadius: 10,
marginBottom: 12,
alignItems: 'center',
flexDirection: 'row',
...ElevationObject(5),
backgroundColor: colorLight,
justifyContent: 'space-between'
},
layer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,.5)'
},
dialog: {
width: Dialog.dialogWidth,
borderRadius: isIOS ? 16 : 12,
overflow: 'hidden',
backgroundColor: colorLight
},
label: {
flex: 1,
color: textPrimary,
fontSize: 14,
fontWeight: 'bold',
paddingLeft: 14
},
title: {
paddingTop: 24,
color: textPrimary,
fontSize: 18,
fontWeight: 'bold',
textAlign: "center"
},
message: {
color: textPrimary,
fontSize: 14,
paddingTop: 16,
paddingLeft: 24,
paddingRight: 24,
paddingBottom: 32
},
idleFeeLabel: {
color: textPrimary,
fontSize: 14,
paddingTop: 12,
fontWeight: "bold"
},
idleFeeText: {
color: textPrimary,
fontSize: 14,
paddingTop: 4
},
cancelButton: {
flex: 1,
borderRadius: 0,
backgroundColor: "#F0F0F0"
},
confirmButton: {
flex: 1,
borderRadius: 0,
backgroundColor: colorAccent
}
})