import React, { useState } from 'react'; import { StyleSheet, View } from 'react-native'; import { useLanguage } from 'ordering-components/native'; import Feather from 'react-native-vector-icons/Feather' import { useTheme } from 'styled-components/native'; import { OText, OButton } from '../../shared'; import { OModal } from '../../../../../../src/components/shared'; import { PurchaseGiftCard } from '../PurchaseGiftCard' import { RedeemGiftCard } from '../RedeemGiftCard' import { Container } from './styles' export const GiftCardUI = React.memo((props: any) => { const { navigation } = props const [, t] = useLanguage() const theme = useTheme() const [openModal, setOpenModal] = useState(null) const style = StyleSheet.create({ title: { flexDirection: 'row', alignItems: 'center' }, actionWrapper: { flexDirection: 'row', alignItems: 'center', marginTop: 10 }, btnStyle: { borderRadius: 7.6, paddingLeft: 0, paddingRight: 0, height: 44 } }) const handleCustomGoToCheckout = (uuid: any) => { setOpenModal(null) navigation.navigate('CheckoutNavigator', { screen: 'CheckoutPage', cartUuid: uuid }) } return ( {t('GIFT_CARD', 'Gift card')} setOpenModal('purchase')} text={t('PURCHASE', 'Purchase')} textStyle={{ fontSize: 13 }} imgRightSrc={null} style={{ ...style.btnStyle, marginRight: 14 }} /> setOpenModal('redeem')} text={t('REDEEM', 'Redeem')} bgColor={theme.colors.lightPrimary} borderColor={theme.colors.lightPrimary} textStyle={{ color: theme.colors.primary, fontSize: 13 }} imgRightSrc={null} style={style.btnStyle} /> setOpenModal(null)} entireModal customClose > setOpenModal(null)} /> setOpenModal(null)} entireModal customClose > setOpenModal(null)} /> ) })