import { ReactElement } from "react"; import { BlockInstance } from "@wordpress/blocks"; import { BlockValidationResult } from "../../core/validation"; import BlockInstruction from "../../core/blocks/BlockInstruction"; import { RenderEditProps, RenderSaveProps } from "../../core/blocks/BlockDefinition"; import { InnerBlocksInstructionOptions } from "./InnerBlocksInstructionOptions"; import BlockLeaf from "../../core/blocks/BlockLeaf"; /** * InnerBlocks instruction. */ export default class InnerBlocks extends BlockInstruction { options: InnerBlocksInstructionOptions; /** * Renders saving the instruction. * * @param props The props. * @param leaf The leaf. * @param i The index. * * @returns The inner blocks. */ save(props: RenderSaveProps, leaf: BlockLeaf, i: number): ReactElement | string; /** * Renders editing the instruction. * * @param props The props. * @param leaf The leaf. * @param i The index. * * @returns The inner blocks. */ edit(props: RenderEditProps, leaf: BlockLeaf, i: number): ReactElement | string; /** * Renders the appender to add innerblocks as React elements. * * @param clientId The clientId of this block. * @param label The label to show next to the appender.. * * @returns The block appender function. */ private renderAppender; /** * Ensures all required and recommended blocks are allowed blocks. * * @param properties The properties of the current block. */ private arrangeAllowedBlocks; /** * Renders the sidebar. * * @param props The props. * * @returns The sidebar element to render. */ sidebar(props: RenderEditProps): ReactElement; /** * Checks if the InnerBlock and it's schildren are valid. * * @param blockInstance The block instance being validated. * * @returns {BlockValidationResult} The validation result. */ validate(blockInstance: BlockInstance): BlockValidationResult; }