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

export default function save({ attributes }) {
	const { bgColor } = attributes;
	const currentColorName = bgColor === "#F5F5F5" ? "gray" : "white";

	return (
		<section
			{...useBlockProps.save({
				className: `homegrade-content-blocks-content-box homegrade-content-blocks-content-box--${currentColorName}`,
			})}
			style={{
				backgroundColor: bgColor,
			}}
		>
			<InnerBlocks.Content />
		</section>
	);
}
