import React from 'react'; import { Icon } from '@akinon/next/components'; import type { PaymentMethodSelectorProps } from '../types/custom-render.types'; const PaymentMethodSelector: React.FC = ({ cards, selectedMethod, onMethodChange, texts }) => { const hasStoredCards = cards && cards.length > 0; return (

{texts.paymentMethodTitle}

{texts.paymentMethodDescription}

{hasStoredCards && (
onMethodChange('stored_card')} >
{selectedMethod === 'stored_card' && (
)}
{texts.savedCardsText}
{texts.savedCardsDescription.replace( '{count}', cards.length.toString() )}
)}
onMethodChange('new_card')} >
{selectedMethod === 'new_card' && (
)}
{texts.newCardText}
{texts.newCardDescription}
{!hasStoredCards && (

{texts.noPaymentMethodsText}

)}
); }; export default PaymentMethodSelector;