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