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

export default function save({ attributes }) {
	let { figure, title, caption } = attributes;
	return (
		<figure
			{...useBlockProps.save({
				className: `homegrade-blocks-figure`,
			})}
		>
			<RichText.Content
				tagName="h3"
				value={figure}
				className="homegrade-blocks-figure__figure"
			/>
			<RichText.Content
				tagName="p"
				value={title}
				className="homegrade-blocks-figure__title"
			/>
			<figcaption className="homegrade-blocks-figure__caption">
				<RichText.Content tagName="p" value={caption} />
			</figcaption>
		</figure>
	);
}
