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

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

import { InnerBlocks } from "@wordpress/block-editor";

export default function Edit() {
	return (
		<div
			{...useBlockProps({
				className: `homegrade-blocks-explainer-screen`,
			})}
		>
			<InnerBlocks
				template={[
					[
						"core/paragraph",
						{
							content: "Étape 1",
							className: "homegrade-blocks-explainer-screen__step-position",
						},
					],

					[
						"core/heading",
						{
							level: 3,
							className: "homegrade-blocks-explainer-screen__step-title",
							content: "Titre de l'étape",
						},
					],
					[
						"core/paragraph",
						{
							content:
								"Prow scuttle parrel provost Sail ho shrouds spirits boom mizzenmast yardarm. Pinnace holystone mizzenmast quarter crow's nest nipperkin grog yardarm hempen halter furl. Swab barque interloper chantey doubloon starboard grog black jack gangway rutters.",
						},
					],
					["homegrade-content-blocks/focused-schema"],
				]}
				allowedBlocks={[
					"core/title",
					"core/paragraph",
					"homegrade-content-blocks/focused-schema",
					"core/button",
				]}
				renderAppender={() => (
					<BlockControls>
						<button className="wp-block-button__button is-primary">
							{__("Add a newwwww block", "multiblocks")}
						</button>
					</BlockControls>
				)}
			/>
		</div>
	);
}
