/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { Placeholder } from '@wordpress/components';
import { useBlockProps } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import EditorBlock from './editor-block.js';
import { getBlockClassName, getSortArgs } from './utils.js';
const EditorContainerBlock = ( {
attributes,
icon,
name,
noReviewsPlaceholder,
} ) => {
const {
categoryIds,
productId,
reviewsOnPageLoad,
showProductName,
showReviewDate,
showReviewerName,
showReviewContent,
showReviewImage,
showReviewRating,
} = attributes;
const { order, orderby } = getSortArgs( attributes.orderby );
const isAllContentHidden =
! showReviewContent &&
! showReviewRating &&
! showReviewDate &&
! showReviewerName &&
! showReviewImage &&
! showProductName;
const blockProps = useBlockProps( {
className: getBlockClassName( attributes ),
} );
if ( isAllContentHidden ) {
return (