/**
 * WordPress dependencies
 */
import { compose } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';

/**
 * Internal dependencies
 */
import BaseDefaultBlockAppender from '../default-block-appender';
import withClientId from './with-client-id';
import { store as blockEditorStore } from '../../store';
import { jsx as _jsx } from "react/jsx-runtime";
export const DefaultBlockAppender = ({
  clientId
}) => {
  return /*#__PURE__*/_jsx(BaseDefaultBlockAppender, {
    rootClientId: clientId
  });
};
export default compose([withClientId, withSelect((select, {
  clientId
}) => {
  const {
    getBlockOrder
  } = select(blockEditorStore);
  const blockClientIds = getBlockOrder(clientId);
  return {
    lastBlockClientId: blockClientIds[blockClientIds.length - 1]
  };
})])(DefaultBlockAppender);
//# sourceMappingURL=default-block-appender.js.map