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

	blocks.registerBlockType( 'ambassadorhub/team-count', {
		title: __( 'Team Count', 'ambassadorhub' ),
		icon: 'groups',
		category: 'ambassadorhub',
		edit: function( props ) {
			var blockProps = wp.blockEditor.useBlockProps();
			return el( 'div', blockProps,
				el( serverSideRender, {
					block: 'ambassadorhub/team-count',
					attributes: props.attributes
				} )
			);
		},
		save: function() {
			return null;
		}
	} );
} )(
	window.wp.blocks,
	window.wp.element,
	window.wp.i18n,
	window.wp.serverSideRender
);