/**
 * Registers a new block provided a unique name and an object defining its behavior.
 *
 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
 */
import { registerBlockType } from "@wordpress/blocks";
import { InnerBlocks } from "@wordpress/block-editor";
/**
 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
 * All files containing `style` keyword are bundled together. The code used
 * gets applied both to the front of your site and to the editor.
 *
 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
 */
import "./style.scss";

/**
 * Internal dependencies
 */
import Edit from "./edit";
import metadata from "./block.json";

/**
 * Every block starts by registering a new block type definition.
 *
 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
 */
registerBlockType(metadata.name, {
	icon: {
		src: (
			<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 576 512">
        <path d="M150.6 489.4L128 512l-22.6-22.6L54.6 438.6 32 416l22.6-22.6L425.4 22.6 448 0l22.6 22.6 50.7 50.7L544 96l-22.6 22.6L150.6 489.4zM498.7 96L448 45.3 337.9 155.3l50.7 50.7L498.7 96zM128 466.7L366.1 228.7l-50.7-50.7L77.3 416 128 466.7zM252.2 3.8l0 12.2 0 19.8 19.8 0 12.2 0 0 24.3-12.2 0-19.8 0 0 19.8 0 12.2-24.3 0 0-12.2 0-19.8-19.8 0-12.2 0 0-24.3 12.2 0 19.8 0 0-19.8 0-12.2 24.3 0zM128 80l0 48 48 0 16 0 0 32-16 0-48 0 0 48 0 16-32 0 0-16 0-48-48 0-16 0 0-32 16 0 48 0 0-48 0-16 32 0 0 16zM480 336l0 48 48 0 16 0 0 32-16 0-48 0 0 48 0 16-32 0 0-16 0-48-48 0-16 0 0-32 16 0 48 0 0-48 0-16 32 0 0 16z"/>
      </svg>
		),
	},
	/**
	 * @see ./edit.js
	 */
	edit: Edit,
	save: () => <InnerBlocks.Content />,
});
