import { __ } from "@wordpress/i18n";
import "./editor.scss";

import {
	useBlockProps,
	RichText,
	BlockControls,
	InnerBlocks,
} from "@wordpress/block-editor";

export default function Edit() {
	return (
		<div
			{...useBlockProps({
				className: `homegrade-blocks-infos-seminaires`,
			})}
		>
			<InnerBlocks
				allowedBlocks={[
					"core/paragraph",
					"core/heading",
					"core/buttons",
					"core/button",
					"core/image",
					"homegrade-content-blocks/content-heading",
					"homegrade-content-blocks/icon",
					"homegrade-content-blocks/date",
				]}
				template={[
					[
						"homegrade-content-blocks/icon",
						{ className: "homegrade-blocks-infos-seminaires__icon" },
					],

					[
						"homegrade-content-blocks/content-heading",
						{
							title: "Titre du séminaire",
							headingLevel: "h3",
							className: "homegrade-blocks-infos-seminaires__title",
						},
					],
					[
						"homegrade-content-blocks/date",
						{
							date: "Date du séminaire",
							className: "homegrade-blocks-infos-seminaires__date",
						},
					],
					[
						"core/paragraph",
						{
							content:
								"Ajouter ici la description du seminaire texte : Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas quis dolor at elit finibus pretium vitae non dolor. Nulla mattis est ut lectus viverra, sed ultrices erat eleifend. Praesent non nisl purus. In volutpat in nisl a porta. Ut pulvinar enim sit amet risus laoreet lacinia. ",
							placeholder: "Ajouter ici la description du seminaire ",
						},
					],
					[
						"core/paragraph",
						{
							content: "par Auteur du séminaire",
							style: { fontWeight: "bold" },
							className: "homegrade-blocks-infos-seminaires__author",
						},
					],
					["core/button", { text: "S'inscrire", style: "fill" }],
				]}
			/>
		</div>
	);
}
