/** * External dependencies */ import clsx from 'clsx'; /** * WordPress dependencies */ import deprecated from '@wordpress/deprecated'; import { Button, __experimentalText as Text, __experimentalVStack as VStack, } from '@wordpress/components'; import { chevronLeft, chevronRight } from '@wordpress/icons'; import { __, isRTL, sprintf } from '@wordpress/i18n'; import { useSelect, useDispatch } from '@wordpress/data'; /** * Internal dependencies */ import BlockIcon from '../block-icon'; import { store as blockEditorStore } from '../../store'; function BlockCard({ title, icon, description, blockType, className, name, inspectorBlockInfo, }) { if ( blockType ) { deprecated( '`blockType` property in `BlockCard component`', { since: '5.7', alternative: '`title, icon and description` properties', } ); ( { title, icon, description } = blockType ); } const { parentNavBlockClientId } = useSelect( ( select ) => { const { getSelectedBlockClientId, getBlockParentsByBlockName } = select( blockEditorStore ); const _selectedBlockClientId = getSelectedBlockClientId(); return { parentNavBlockClientId: getBlockParentsByBlockName( _selectedBlockClientId, 'core/navigation', true )[ 0 ], }; }, [] ); const { selectBlock } = useDispatch( blockEditorStore ); return (