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

/**
 * The save function defines the way in which the different attributes should
 * be combined into the final markup, which is then serialized by the block
 * editor into `post_content`.
 *
 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
 *
 * @return {Element} Element to render.
 */
export default function Save({ attributes }) {
    const { hasSidecontent } = attributes; // Retrieve the hasSidecontent attribute
    const blockProps = useBlockProps.save();

    // Conditionally add the 'has-sidecontent' class if hasSidecontent is true
    const className = hasSidecontent ? 'has-sidecontent' : '';

    return (
        <div  class={className} id="lcp-viewport-outer">
            <div id="lcp-viewport-inner" class={className}>
                <InnerBlocks.Content />
            </div>
        </div>
    );
}
