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

import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
import { MediaReplaceFlow, MediaPlaceholder } from "@wordpress/block-editor";
import { ToolbarGroup, ToolbarButton } from "@wordpress/components";
import { trash } from "@wordpress/icons";

export default function Edit({
	attributes,
	setAttributes,
	clientId,
	...props
}) {
	return (
		<>
			<section
				{...useBlockProps({
					className: `homegrade-blocks-chapitrage-thematique`,
				})}
			>
				<InnerBlocks
					allowedBlocks={["homegrade-content-blocks/chapitre-thematique"]}
					template={[
						[
							"homegrade-content-blocks/chapitre-thematique",
							{ chapterTitle: "Titre de votre chapitre" },
							[
								[
									"homegrade-content-blocks/lien-chapitre",
									{
										chapterLinkTitle: "Lien chapitre 1 ",
										chapterLinkDescription:
											"Un description de cette page specifique",
									},
								],
							],
						],
					]}
				/>
			</section>
		</>
	);
}
