/* eslint-disable @wordpress/no-unsafe-wp-apis */ /** * External dependencies */ import { InspectorControls, useBlockProps, PlainText, } from '@wordpress/block-editor'; import { cartOutline, bag, bagAlt } from '@woocommerce/icons'; import { __ } from '@wordpress/i18n'; import { Icon, PanelBody, __experimentalToggleGroupControlOption as ToggleGroupControlOption, __experimentalToggleGroupControl as ToggleGroupControl, } from '@wordpress/components'; /** * Internal dependencies */ import './style.scss'; import QuantityBadge from '../mini-cart/quantity-badge'; export interface Attributes { cartIcon: 'cart' | 'bag' | 'bag-alt'; content: string; } interface Props { attributes: Attributes; setAttributes: ( attributes: Record< string, unknown > ) => void; } const Edit = ( { attributes, setAttributes }: Props ): JSX.Element => { const { cartIcon, content } = attributes; const blockProps = useBlockProps(); return (