import * as React from 'react'; // ---------- structure objects ---------- export interface OptionObject { value: string; text: React.ReactNode; makeVisible: Array; elementType: 'option'; } export interface SelectObject { elementType: 'select'; /** name or id is mandatory */ name?: string; id?: string | null; customchange?: CustomChangeHandler | null; placeholder?: string; label?: string | null; options: OptionObject[]; } export interface ComponentObject { elementType: 'component'; name: string; component: React.ReactElement; } export type ElementObject = SelectObject | ComponentObject; // ---------- callbacks ---------- /** * Second argument of a customchange handler: inserts elements * under the