/** * External dependencies */ import { __ } from '@wordpress/i18n'; import classnames from 'classnames'; import { PlainText, InspectorControls, useBlockProps, } from '@wordpress/block-editor'; import { PanelBody, ToggleControl } from '@wordpress/components'; /** * Internal dependencies */ import FormStepHeading from './form-step-heading'; export interface FormStepBlockProps { attributes: { title: string; description: string; showStepNumber: boolean }; setAttributes: ( attributes: Record< string, unknown > ) => void; className?: string; children?: React.ReactNode; lock?: { move: boolean; remove: boolean }; } /** * Form Step Block for use in the editor. */ export const FormStepBlock = ( { attributes, setAttributes, className = '', children, }: FormStepBlockProps ): JSX.Element => { const { title = '', description = '', showStepNumber = true } = attributes; const blockProps = useBlockProps( { className: classnames( 'wc-block-components-checkout-step', className, { 'wc-block-components-checkout-step--with-step-number': showStepNumber, } ), } ); return (