import { __ } from '@wordpress/i18n'; import { getField } from '../fields/FieldRegistry'; /** * A single field card in the canvas. * Shows field label + drag handle + delete button. * Clicking selects the field (shows its settings in the right panel). */ export default function FieldItem( { field, index, isSelected, dispatch, onDropAbove } ) { const def = getField( field.type ); const handleDragStart = ( e ) => { e.dataTransfer.setData( 'bp_field_id', field.id ); e.dataTransfer.effectAllowed = 'move'; }; const handleDragOver = ( e ) => { e.preventDefault(); e.stopPropagation(); }; return (