import { type IconValue } from "../IconLib/IconType"; export declare enum NodeType { ROOT = 2, FIELD = 3, FILE = 4, PROP = 5 } export interface NodeBase { nid: string; type: NodeType; parent: NodeBase | null; visible: boolean | string; getIcon?: () => IconValue; getMenu?: () => MenuItem[] | null; onCommand?: (cmd: string) => void; onIconClick?: () => void; onDClick?: () => void; } export interface NodeProp extends NodeBase { type: NodeType.PROP; kind: string; props: NodeProp[]; update?(): void; } export interface NodeField extends NodeBase { type: NodeType.FIELD; name: string; kind: string; prop?: NodeProp; files: NodeFile[]; childs: NodeField[]; expanded: boolean; } export interface NodeFile extends NodeBase { type: NodeType.FILE; name: string; kind: string; prop?: NodeProp; edit?: any; } export interface NodeRoot extends NodeBase { type: NodeType.ROOT; prop?: NodeProp; files: NodeFile[]; childs: NodeField[]; getItemIcon(item: NodeBase | null): IconValue; getItemMenu(item: NodeBase | null): MenuItem[] | null; } export interface MenuItem { icon?: IconValue; text: string; cmd?: string; } export declare function newProp(parent: NodeBase | null, kind: string, props?: NodeProp[]): NodeProp; export declare function newFile(parent: NodeBase | null, name: string, kind: string): NodeFile; export declare function newField(parent: NodeBase | null, name: string, kind: string, childs?: NodeField[], files?: NodeFile[]): NodeField; export declare function newRoot(childs?: NodeField[], files?: NodeFile[]): NodeRoot; export declare function setParent(item: NodeBase, parent: NodeBase): void; export declare function addItem(parent: NodeBase, item: NodeBase): void; export declare function removeItem(parent: NodeBase, item: NodeBase): void;