import { ToggleControl } from '@wordpress/components'; import SettingsBlock from './SettingsBlock'; import PaymentMethodIcon from '../PaymentMethodIcon'; import data from '../../../utils/data'; import { hasSettings } from '../../Screens/Overview/TabSettingsElements/Blocks/PaymentMethods'; const PaymentMethodItemBlock = ( { id, title, description, icon, onTriggerModal, onSelect, isSelected, } ) => { // Only show settings icon if this method has fields configured const hasModal = hasSettings( id ); return (
{ title }

{ description }

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