/** * External dependencies */ import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; import { formatPrice } from '@woocommerce/price-format'; import { PanelBody, ExternalLink, ToggleControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, __experimentalToggleGroupControl as ToggleGroupControl, } from '@wordpress/components'; import { getSetting } from '@woocommerce/settings'; import { __ } from '@wordpress/i18n'; import Noninteractive from '@woocommerce/base-components/noninteractive'; import type { ReactElement } from 'react'; import { useSelect } from '@wordpress/data'; /** * Internal dependencies */ import QuantityBadge from './quantity-badge'; interface Attributes { addToCartBehaviour: string; hasHiddenPrice: boolean; cartAndCheckoutRenderStyle: boolean; } interface Props { attributes: Attributes; setAttributes: ( attributes: Record< string, unknown > ) => void; } const Edit = ( { attributes, setAttributes }: Props ): ReactElement => { const { addToCartBehaviour, hasHiddenPrice, cartAndCheckoutRenderStyle } = attributes; const blockProps = useBlockProps( { className: `wc-block-mini-cart`, } ); const isSiteEditor = useSelect( 'core/edit-site' ) !== undefined; const templatePartEditUri = getSetting( 'templatePartEditUri', '' ) as string; const productCount = 0; const productTotal = 0; return (
{ __( 'Edit the appearance of the Mini Cart.', 'woo-gutenberg-products-block' ) }