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

export default function save({ attributes }) {
	const { iconUrl, iconAlt, coverAlt, coverUrl } = attributes;

	return (
		<div
			{...useBlockProps.save({
				className: `homegrade-blocks-parcours-chapter parcours-chapter`,
			})}
		>
			<div className="parcours-chapter__cover">
				{coverUrl && <img src={coverUrl} alt={coverAlt} />}
			</div>
			<div className="parcours-chapter__icon">
				{iconUrl && <img src={iconUrl} alt={iconAlt} />}
			</div>

			<div className="parcours-chapter__content">
				<InnerBlocks.Content />
			</div>
		</div>
	);
}
