import { ToggleControl } from '@wordpress/components'; import SettingsBlock from './SettingsBlock'; import PaymentMethodIcon from '../PaymentMethodIcon'; import data from '../../../utils/data'; import { MODAL_CONFIG } from '../../Screens/Overview/Modals/Modal'; const PaymentMethodItemBlock = ( { id, title, description, icon, onTriggerModal, onSelect, isSelected, } ) => { // Only show settings icon if this method has a modal configured const hasModal = Boolean( MODAL_CONFIG[ id ] ); return (
{ title }

{ description }

{ hasModal && onTriggerModal && (
{ data().getImage( 'icon-settings.svg' ) }
) }
); }; export default PaymentMethodItemBlock;