import { Button } from '@wordpress/components'; import PaymentMethodIcon from './PaymentMethodIcon'; import { PayPalCheckbox } from './Fields'; import { useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; const PaymentMethodItem = ( props ) => { const [ paymentMethodState, setPaymentMethodState ] = useState(); const [ modalIsVisible, setModalIsVisible ] = useState( false ); let Modal = null; if ( props?.modal ) { Modal = props.modal; } const handleCheckboxState = ( checked ) => { if ( checked ) { setPaymentMethodState( props.payment_method_id ); } else { setPaymentMethodState( null ); } }; return ( <>
{ props.description }