/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { Disabled, PanelBody, ToggleControl } from '@wordpress/components'; import { compose } from '@wordpress/compose'; import { InspectorControls, BlockControls, AlignmentToolbar, useBlockProps, } from '@wordpress/block-editor'; import { isFeaturePluginBuild } from '@woocommerce/block-settings'; import HeadingToolbar from '@woocommerce/editor-components/heading-toolbar'; /** * Internal dependencies */ import Block from './block'; import withProductSelector from '../shared/with-product-selector'; import { BLOCK_TITLE, BLOCK_ICON } from './constants'; import { Attributes } from './types'; import './editor.scss'; interface Props { attributes: Attributes; setAttributes: ( attributes: Record< string, unknown > ) => void; } const TitleEdit = ( { attributes, setAttributes }: Props ): JSX.Element => { const blockProps = useBlockProps(); const { headingLevel, showProductLink, align, linkTarget } = attributes; return (