import "./render-item";
import "./vnode-renderer";
import "./vnode";

// Note: This type is not meant to be public

/**
 * Per node rendering-state when rendering a tree of VNodes
 * @typedef VRenderQueueItemMetadata
 * @interface
 * @category VDOM.renderer
 * @property {VNodeRenderer} renderer - The renderer that will render this item
 * @property {VNodeType} normedType - The normed type of a VNode, for most VNode this just maps to vnode.type, but a text-node normally does not have a type.
 * // TODO positional info..
 **/

/**
 * Per node rendering-state when rendering a tree of VNodes
 * @typedef VRenderQueueItem
 * @interface
 * @category VDOM.renderer
 * @property {VRenderItem} item - The item to queue for rendering
 * @property {VRenderQueueItemMetadata} meta - Meta data for the item such as normedType and the renderer to use(from a preprocessing stage)
 * @property {VRenderItem} previous - The item that will have been inserted before this one
 **/

/**
 * Temporary data structure for listing an old VNode
 * @typedef VOldQueueItem
 * @interface
 * @category VDOM.renderer
 * @property {VNode} vnode - The old vnode
 * @property {VRenderQueueItemMetadata} meta - Meta data for the item such as normedType and the renderer to use(from a preprocessing stage)
 * @property {Element} element - The matching element
 **/

/**
 * Global rendering-state when rendering a tree of VNodes
 * @typedef VRenderState
 * @interface
 * @category VDOM.renderer
 * @property {Array.<VRenderQueueItem>} queue - The queue of items to be rendered
 * @property {Array.<[Function,Element]>} refs - Ref-callback functions be called when rendering is done
 * @property {Map.<string, VOldQueueItem>} keyedElements - A map of (old) keyed elements
 **/
