const settings_cuotas = window.wc.wcSettings.getSetting( 'cetelem_cuotas_data', {} );

const label_cuotas = window.wp.htmlEntities.decodeEntities( settings_cuotas.title ) || window.wp.i18n.__( 'Pay with enCuotas', 'cetelem-payment-gateway'  );

const Label_cuotas = React.createElement( 'div', { style: { display: 'flex', 'justify-content': 'space-between', width: '100%' } }, label_cuotas, React.createElement( 'img', { src: settings_cuotas.icon, alt: settings_cuotas.title } ) );

const Content_cuotas = () => {
    return window.wp.htmlEntities.decodeEntities( settings_cuotas.description || '' );
};

const htmlToElem_cuotas = ( html ) => wp.element.RawHTML( { children: html } );

const Cetelem_cuotas_Gateway = {
    name: 'cetelem_cuotas',
    label: Label_cuotas,
    icon: settings_cuotas.icon,
    content: htmlToElem_cuotas( settings_cuotas.description ),
    edit: Object( window.wp.element.createElement )( Content_cuotas, null ),
    canMakePayment: () => true,
    ariaLabel: label_cuotas,
    supports: {
        features: settings_cuotas.supports,
    },
};
window.wc.wcBlocksRegistry.registerPaymentMethod( Cetelem_cuotas_Gateway );