import React, { ReactElement } from 'react'; import { IPage } from '../components/core/blocks/basic/Page'; import { BlockType } from '../constants'; export interface IBlock { name: string; type: BlockType; Panel: () => React.ReactNode; create: (payload?: RecursivePartial) => T; validParentType: BlockType[]; render?: (data: T, idx: string | null, context: IPage) => IBlockData | ReactElement; } export interface IBlockData { type: BlockType; data: { value: T; hidden?: boolean | string; shadow?: boolean; }; attributes: K & { 'css-class'?: string; }; children: IBlockData[]; } export interface IEmailTemplate { content: IPage; subject: string; subTitle: string; } export interface create { (payload?: RecursivePartial): T; } export declare type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] : T[P] extends object ? RecursivePartial : T[P]; };