/**
 * WordPress dependencies
 */
import { sprintf, _n } from '@wordpress/i18n';
import { withSelect } from '@wordpress/data';
import { serialize } from '@wordpress/blocks';
import { count as wordCount } from '@wordpress/wordcount';
import { copy } from '@wordpress/icons';

/**
 * Internal dependencies
 */
import BlockIcon from '../block-icon';
import { store as blockEditorStore } from '../../store';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
function MultiSelectionInspector({
  blocks
}) {
  const words = wordCount(serialize(blocks), 'words');
  return /*#__PURE__*/_jsxs("div", {
    className: "block-editor-multi-selection-inspector__card",
    children: [/*#__PURE__*/_jsx(BlockIcon, {
      icon: copy,
      showColors: true
    }), /*#__PURE__*/_jsxs("div", {
      className: "block-editor-multi-selection-inspector__card-content",
      children: [/*#__PURE__*/_jsx("div", {
        className: "block-editor-multi-selection-inspector__card-title",
        children: sprintf( /* translators: %d: number of blocks */
        _n('%d Block', '%d Blocks', blocks.length), blocks.length)
      }), /*#__PURE__*/_jsx("div", {
        className: "block-editor-multi-selection-inspector__card-description",
        children: sprintf( /* translators: %d: number of words */
        _n('%d word selected.', '%d words selected.', words), words)
      })]
    })]
  });
}
export default withSelect(select => {
  const {
    getMultiSelectedBlocks
  } = select(blockEditorStore);
  return {
    blocks: getMultiSelectedBlocks()
  };
})(MultiSelectionInspector);
//# sourceMappingURL=index.js.map