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

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

export default function Edit({ attributes, setAttributes }) {
	const { textContent } = attributes;

	return (
		<>
			<aside
				{...useBlockProps({
					className: `homegrade-blocks-aside`,
				})}
			>
				<RichText
					onChange={(value) => setAttributes({ textContent: value })}
					value={textContent}
					tagName="p"
					className="aside-content"
					placeholder="Ajoutez votre texte ici"
				/>
			</aside>
		</>
	);
}
