/**
 * Account Block - Editor Registration
 */
( function( blocks, element, i18n, serverSideRender ) {
	var el = element.createElement;
	var __ = i18n.__;

	blocks.registerBlockType( 'ambassadorhub/account', {
		title: __( 'Ambassador Account', 'ambassadorhub' ),
		icon: 'admin-users',
		category: 'ambassadorhub',
		edit: function() {
			var blockProps = wp.blockEditor.useBlockProps();
			return el( 'div', blockProps,
				el( serverSideRender, {
					block: 'ambassadorhub/account'
				} )
			);
		},
		save: function() {
			return null; // Server-side render
		}
	} );
} )(
	window.wp.blocks,
	window.wp.element,
	window.wp.i18n,
	window.wp.serverSideRender
);
