/** * WordPress dependencies */ import { __ } from "@wordpress/i18n"; import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; import { useEffect, useState, useRef } from "@wordpress/element"; import { select, dispatch, useSelect } from "@wordpress/data"; /** * Internal dependencies */ const { duplicateBlockIdFix, filterBlocksByName, getBlockParentClientId, EBDisplayIcon, DynamicInputValueHandler, BlockProps } = EBControls; import classnames from "classnames"; import Inspector from "./inspector"; import Style from "./style"; export default function Edit(props) { const { attributes, setAttributes, isSelected, clientId, className, name, } = props; const { resOption, blockMeta, parentBlockId, blockId, classHook, showLabel, labelText, fieldName, defaultValue, placeholderText, isRequired, validationMessage, validationRules, numberValidationMessage, isIcon, icon, formStyle, parentBlockPaddingLeft, parentBlockPaddingUnit, parentBlockIconSize, parentIconColor, } = attributes; // you must declare this variable const enhancedProps = { ...props, blockPrefix: 'eb-number-field', rootClass: "eb-guten-block-main-parent-wrapper eb-form-field", style: