import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
export default function save({ attributes }) {
	const { disposition, coverUrl, coverAlt, coverSize } = attributes;
	return (
		<section
			{...useBlockProps.save({
				className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} `,
			})}
		>
			<div className="chapter-section__content">
				<div className="chapter-section__innerblocks">
					<InnerBlocks.Content />
				</div>
			</div>
			{coverUrl && (
				<img
					className={`chapter-section__cover chapter-section__cover--${coverSize}`}
					src={coverUrl}
					alt={coverAlt}
				/>
			)}
		</section>
	);
}
