import { __ } from "@wordpress/i18n";
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
import "./editor.scss";

export default function Edit({ attributes, setAttributes }) {
	return (
		<>
			<div
				{...useBlockProps({
					className: `scroll-story-block`,
				})}
			>
				<InnerBlocks
					allowedBlocks={["carhop-blocks/narrative-card"]}
					template={[
						[
							"carhop-blocks/narrative-card",
							{
								hasCover: true,
								coverPosition: "left",
								innerBlocks: [
									["core/heading", { content: "Lorem ipsum" }],
									[
										"core/paragraph",
										{
											content:
												"Lorem ipsum dolor sit amet consectetur adipisicing elit.",
										},
									],
								],
							},
						],
						[
							"carhop-blocks/narrative-card",
							{
								hasCover: true,
								coverPosition: "right",
								innerBlocks: [
									["core/heading", { content: "Lorem ipsum" }],
									[
										"core/paragraph",
										{
											content:
												"Lorem ipsum dolor sit amet consectetur adipisicing elit.",
										},
									],
								],
							},
						],
					]}
				/>
			</div>
		</>
	);
}
