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

export default function Edit({ attributes, setAttributes }) {
	const { content } = attributes;
	const blockProps = useBlockProps({
		className: "block-chapo",
	});

	return (
		<>
			<RichText
				{...blockProps}
				tagName="p"
				placeholder={__("Un bien beau chapo", "chapo")}
				value={content}
				onChange={(content) => setAttributes({ content })}
			/>
		</>
	);
}
