import { IPage } from '../blocks'; export interface IBlock { name: string; type: string; create: (payload?: RecursivePartial) => T; validParentType: string[]; render: (params: { data: T; idx?: string | null; mode: 'testing' | 'production'; context?: IPage; dataSource?: { [key: string]: any; }; children?: React.ReactNode; keepClassName?: boolean; renderPortal?: (props: Omit['render']>[0], 'renderPortal'> & { refEle: HTMLElement; }) => React.ReactNode; }) => React.ReactNode; } export interface IBlockData = any, Data extends { [key: string]: any; } = any> { title?: string; type: string; data: { value: Data; hidden?: boolean | string; }; attributes: Attr & { 'css-class'?: string; }; children: IBlockData[]; } 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]; };