/*
 * BLOCK: FLO Post List
 */

// Import block dependencies and components
import edit from './edit';

//  Import CSS.
import './style.scss';
import './editor.scss';

// Register block controls
import {registerBlockType} from '@wordpress/blocks';

// Register the block
registerBlockType('flo-block/post-grid', {
	title: 'Flo Listing Grid',
	description: 'Show post grid',
	icon: (
		<svg
			width="18"
			height="18"
			viewBox="0 0 18 18"
			fill="none"
			xmlns="http://www.w3.org/2000/svg"
		>
			<path
				d="M0 10H8V0H0V10ZM0 18H8V12H0V18ZM10 18H18V8H10V18ZM10 0V6H18V0H10Z"
				fill="black"
			/>
		</svg>
	),

	category: 'flo',
	keywords: [],
	supports: {
		anchor: true,
	},
	example: {
		attributes: {
			preview: true,
		},
	},
	edit,
	// Render via PHP
	save() {
		return null;
	},
});
