import React from 'react'; import { TextStyle, TouchableOpacity, View } from 'react-native'; import { AddressDetails as AddressDetailsController, useOrder } from 'ordering-components-external/native'; import { ADContainer, ADHeader, ADAddress, ADMap } from './styles'; import { OText, OIcon } from '../shared'; import { useTheme } from 'styled-components/native' const AddressDetailsUI = (props: any) => { const { navigation, addressToShow, isCartPending, googleMapsUrl, apiKey, title } = props; const [orderState] = useOrder(); const theme = useTheme(); return ( {!!apiKey && googleMapsUrl && ( )} {title ? {title} : null} {addressToShow || orderState?.options?.address?.address} {orderState?.options?.type === 1 && !isCartPending && navigation.navigate('AddressList', { isFromCheckout: true })}> } ) } export const AddressDetails = (props: any) => { const addressDetailsProps = { ...props, UIComponent: AddressDetailsUI } return ( ) }