import React from 'react' import { useLanguage, PurchaseGiftCard as PurchaseGiftCardController } from 'ordering-components/native' import { StyleSheet, View, TouchableOpacity, ScrollView, Platform } from 'react-native' import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'; import { useTheme } from 'styled-components/native'; import { OText, OButton, OIcon } from '../../shared'; import AntDesignIcon from 'react-native-vector-icons/AntDesign' import { Container } from './styles' const PurchaseGiftCardUI = (props: any) => { const { productsListState, selectedProduct, setSelectedProduct, handleAccept, onClose } = props const theme = useTheme() const [, t] = useLanguage() const style = StyleSheet.create({ itemStyle: { flexDirection: 'row', alignItems: 'center', paddingVertical: 15, borderBottomWidth: 1, borderBottomColor: theme.colors.disabled }, btnStyle: { borderRadius: 7.6, paddingLeft: 0, paddingRight: 0, height: 44, marginTop: 50 } }) return ( {t('PURCHASE_GIFT_CARD', 'Purchase gift card')} {t('SELECT_ONE_OPTION', 'Select one option')} {productsListState.loading && ( [...Array(5).keys()].map(i => ( )) )} {productsListState.products.map(product => ( setSelectedProduct(product)} > {selectedProduct?.id === product.id ? ( ) : ( )} {product.name} ))} handleAccept()} text={t('ACCEPT', 'Accept')} textStyle={{ fontSize: 13 }} imgRightSrc={null} style={style.btnStyle} isDisabled={!selectedProduct} /> ) } export const PurchaseGiftCard = (props: any) => { const purchaseGiftCardProps = { ...props, UIComponent: PurchaseGiftCardUI } return }