/**
* 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:
};
//UseEffect for set Validation rules
useEffect(() => {
const rules = {
[fieldName]: {
isRequired: {
status: isRequired,
message: validationMessage,
},
isNumber: {
message: numberValidationMessage,
},
},
};
setAttributes({ validationRules: rules });
}, [isRequired, fieldName, validationMessage]);
return (
<>
{isSelected && (
Play In Fairgo Australian On-line Casino<\/p>\n
Content<\/p>\n
Before moving upon to actual betting to obtain real prizes, we advise involving on these variants first to hone your skills. Using the browser, you can easily login your account upon Android and IOS mobile devices. Bar All In invites both people walking down Mikonkatu and site visitors to the on line casino to take a new break and rest in an everyday lounge atmosphere. Have a cup regarding coffee or enjoy a drink \u2013 you are guaranteed to possess a good time.<\/p>\n