/**
 * Editor stub for the acrwd/redeem block. The block is rendered server-side
 * (render_callback shares Shortcodes::render_redeem); the editor shows a static
 * placeholder because the real form depends on the logged-in customer's cart.
 */
( function ( blocks, element, i18n ) {
	'use strict';

	var el = element.createElement;

	blocks.registerBlockType( 'acrwd/redeem', {
		edit: function () {
			return el(
				'div',
				{ className: 'acrwd-block-placeholder', style: { padding: '8px 12px', background: '#f6f7f8', border: '1px dashed #c3c4c7', borderRadius: '4px' } },
				i18n.__( 'Redeem points — shows the “use your points” cart form here.', 'australcode-points-rewards' )
			);
		},
		save: function () {
			return null;
		}
	} );
} )( window.wp.blocks, window.wp.element, window.wp.i18n );
