import { useState } from '@wordpress/element'; import { ToggleControl } from '@wordpress/components'; import SettingsBlock from './SettingsBlock'; import PaymentMethodIcon from '../PaymentMethodIcon'; import data from '../../../utils/data'; const PaymentMethodItemBlock = ( props ) => { const [ isChecked, setIsChecked ] = useState( false ); const [ modalIsVisible, setModalIsVisible ] = useState( false ); const Modal = props?.modal; return ( <>
{ props.title }

{ props.description }

{ Modal && (
setModalIsVisible( true ) } > { data().getImage( 'icon-settings.svg' ) }
) }
{ Modal && modalIsVisible && ( ) } ); }; export default PaymentMethodItemBlock;