import { Box, HStack, Heading, Text } from '@gluestack-ui/themed'
import { VStack } from '@gluestack-ui/themed'
import React from 'react'
import { strings } from '../utils/i18n'
import VerticalLine from './VerticalLine'
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import { colorStatusDecider, dropPointLocationRenderer } from '../utils/general'
import { Image, ScrollView } from 'react-native'
import { TouchableOpacity } from 'react-native-gesture-handler'
import { store } from '../appredux/store'
import { setSelectedHistoryPicture, setSelectedHistoryPictures, setShowHistoryPicture } from '../appredux/actions'
export const RenderDeliveryOrder = ({data}) => {
if (data && data.length > 0) {
return data.map((item, idx) => {
return (
{strings('label.dropPointLocations')}
)
})
}
}
export const PointConnector = () => {
return (
)
}
export const RenderDropPoint = ({data}) => {
if (data && data.length > 0) {
return data.map((item, idx) => {
return (
{dropPointLocationRenderer(item, 'name')}
{dropPointLocationRenderer(item, 'address')}
{item.status === 'completed' || item.status === 'cancel' ?
: null
}
{item.status === 'completed' || item.status === 'cancel' ?
: null
}
{item.status === 'completed' || item.status === 'cancel' ?
{strings('global.notes')}:
{item.driver_notes && item.driver_notes !== '' ? item.driver_notes : '-'}
: null
}
{ idx !== data.length - 1 ? : null}
)
})
}
}
export const RenderDropPointPictures = ({data}) => {
return (
{strings('history.dropPointPictures')}
{ data && data.length > 0 ? data.map((item, idx) => (
{
store.dispatch(setSelectedHistoryPicture(item))
store.dispatch(setShowHistoryPicture(true))
}}>
)) : - }
)
}
export const RenderDropPointSignature = ({data}) => {
return (
{strings('history.signaturePicture')}
{ data && data.length > 0 ? data.map((item, idx) => (
{
store.dispatch(setSelectedHistoryPicture(item))
store.dispatch(setShowHistoryPicture(true))
}}>
)) : - }
)
}