import { __, _x } from '@wordpress/i18n'; import { Placeholder, TextControl, Button } from '@wordpress/components'; import { useState } from '@wordpress/element'; import { blockDefault } from '@wordpress/icons'; import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor'; import type { BlockEditProps } from '@wordpress/blocks'; import type { PostCommentAttributes } from './types'; export default function Edit( { attributes: { commentId }, setAttributes, }: BlockEditProps< PostCommentAttributes > ) { const [ commentIdInput, setCommentIdInput ] = useState( commentId ); const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps( blockProps ); if ( ! commentId ) { return (