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

export default function save({ attributes }) {
	const { blocktitle, showDescription } = attributes;

	return (
		<div>
			<RichText.Content
				tagName="h2"
				value={blocktitle}
				className="mydummytext"
			/>

			{showDescription && (
				<RichText
					{...useBlockProps()}
					className="description"
					onChange={(value) => setAttributes({ blockDescriptionText: value })}
					value={blockDescriptionText}
					placeholder={__("Test", "homegrade-blocks")}
					tagName="p"
					allowedFormats={[]}
				/>
			)}
		</div>
	);
}
