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

export default function save({ attributes }) {
	const {
		objectScale,
		objectPictureUrl,
		objectPictureAlt,
		objectPosition,
	} = attributes;
	return (
		<img
			{...useBlockProps.save({
				className: `lhoist-blocks-focus-object`,
			})}
			style={{
				height: `${objectScale}%`,
				top: `${objectPosition.y * 100}%`,
				left: `${objectPosition.x * 100}%`,
			}}
			src={objectPictureUrl}
			alt={objectPictureAlt}
			draggable="false"
			ondragstart="return false;"
		/>
	);
}
