/**
 * Mini Progress Bar — editor script.
 */
( function ( wp ) {
	'use strict';

	var el               = wp.element.createElement;
	var __               = wp.i18n.__;
	var ServerSideRender = wp.serverSideRender;

	wp.blocks.registerBlockType( 'ambassadorhub/mini-progress', {

		edit: function ( props ) {
			var blockProps = wp.blockEditor.useBlockProps();

			return el(
				'div',
				blockProps,
				el( ServerSideRender, {
					block:      'ambassadorhub/mini-progress',
					attributes: props.attributes,
				} )
			);
		},

		save: function () {
			return null;
		},
	} );

} )( window.wp );
