const settings = window.wc.wcSettings.getSetting( 'ig_scotiabank_data', {} );
const label = window.wp.htmlEntities.decodeEntities( settings.title ) || window.wp.i18n.__( 'Scotia eCom+™', 'ig-wc-scotiabank' );
const Content = () => {
 	return window.wp.htmlEntities.decodeEntities( settings.description || '' );
};
const Label = () => {
	return window.wp.element.createElement(
		'span',
		{ style: { display: 'flex', flexDirection: 'column', gap: '4px' } },
		window.wp.element.createElement( 'strong', null, label ),
		window.wp.element.createElement( 'img', {
			src: settings.cards,
			alt: window.wp.i18n.__( 'Accepted cards', 'ig-wc-scotiabank' ),
			style: { height: '24px' },
		} )
	);
};
const ScotiabankCheckout = {
 	name: 'ig_scotiabank',
 	label: window.wp.element.createElement( Label, null ),
 	content: Object( window.wp.element.createElement )( Content, null ),
 	edit: Object( window.wp.element.createElement )( Content, null ),
 	canMakePayment: () => true,
 	placeOrderButtonLabel: window.wp.i18n.__( 'Proceed to payment page', 'ig-wc-scotiabank' ),
 	ariaLabel: label,
 	supports: {
 		features: settings.supports,
 	},
};

window.wc.wcBlocksRegistry.registerPaymentMethod( ScotiabankCheckout ); 
