/** * External dependencies */ import clsx from 'clsx'; import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; import { Sidebar } from '@woocommerce/base-components/sidebar-layout'; import { innerBlockAreas } from '@woocommerce/blocks-checkout'; import type { TemplateArray } from '@wordpress/blocks'; /** * Internal dependencies */ import './style.scss'; import { useForcedLayout, getAllowedBlocks, } from '../../../cart-checkout-shared'; export const Edit = ( { clientId, attributes, }: { clientId: string; attributes: { className?: string; }; } ): JSX.Element => { const blockProps = useBlockProps( { className: clsx( 'wc-block-checkout__sidebar', attributes?.className ), } ); const allowedBlocks = getAllowedBlocks( innerBlockAreas.CHECKOUT_TOTALS ); const defaultTemplate = [ [ 'woocommerce/checkout-order-summary-block', {}, [] ], ] as TemplateArray; useForcedLayout( { clientId, registeredBlocks: allowedBlocks, defaultTemplate, } ); return ( ); }; export const Save = (): JSX.Element => { return (
); };