import { FC, Key, PropsWithChildren, ReactElement, ReactNode } from 'react'; export interface PartialCollectionNode { type?: string; key?: Key; element?: ReactNode; props?: any; content?: ReactNode; hasChildren?: boolean; children?: () => Iterable; } export interface CollectionNode { type: string; key: Key; props: any; content: ReactNode; hasChildren: boolean; children: Iterable; } export interface CollectionComponent extends FC { getCollectionNode(props: PropsWithChildren): Iterable; } export declare type CollectionElement

= ReactElement>; export interface CollectionProps { children: CollectionElement | CollectionElement[]; } export declare type CollectionFactory = (nodes: Iterable) => T;