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

export default function save({ attributes }) {
	const { hasIllustration, illustrationUrl, illustrationAlt } = attributes;

	return (
		<div
			{...useBlockProps.save({
				className: `box-monoblock card-large-content homegrade-blocks-box-monoblock ${
					hasIllustration
						? "homegrade-blocks-box-monoblock--has-illustration"
						: ""
				}`,
			})}
		>
			{hasIllustration && illustrationUrl && (
				<img
					className=" homegrade-blocks-box-monoblock__superior-illustration"
					src={illustrationUrl}
					alt={illustrationAlt}
				/>
			)}

			<InnerBlocks.Content />
		</div>
	);
}
