import type { JSONSchema, JSONSchemaArray, JSONSchemaObject, JSONSchemaType } from "@vertesia/common";
import { ArrayPropertySchema, PropertySchema, Schema } from "./schema.js";
export declare function computeTitleFromName(name: string): string;
export declare abstract class Node<SchemaT extends Schema = Schema, ValueT = JSONSchemaType> {
    parent: Node | null;
    schema: SchemaT;
    name: string;
    observer?: (node: Node) => void | false;
    abstract value: ValueT;
    constructor(parent: Node | null, schema: SchemaT, name: string);
    get isRoot(): boolean;
    get root(): Node;
    get path(): string[];
    get isScalar(): boolean;
    get isListItem(): boolean;
    get isObject(): boolean;
    get isList(): boolean;
    get title(): any;
    protected onChange(node: Node): void;
}
export declare abstract class ManagedObjectBase<SchemaT extends Schema = Schema> extends Node<SchemaT, JSONSchemaObject> {
    abstract value: JSONSchemaObject;
    constructor(parent: Node | null, schema: SchemaT, name: string);
    get isObject(): boolean;
    getProperty(name: string): ManagedListProperty | ManagedObjectProperty | ManagedProperty;
    getOrInitObjectProperty(name: string): JSONSchemaObject;
    getOrInitArrayProperty(name: string): JSONSchemaArray;
    setPropertyValue(name: string, value: JSONSchemaType): boolean;
    getPropertyValue(name: string): JSONSchemaType;
    get properties(): Node[];
    [Symbol.iterator](): ArrayIterator<Node<Schema, JSONSchemaType>>;
}
export declare class ManagedObject extends ManagedObjectBase<Schema> {
    value: JSONSchemaObject;
    constructor(schema: Schema | JSONSchema, value?: JSONSchemaObject);
}
export declare class ManagedObjectProperty extends ManagedObjectBase<PropertySchema> {
    value: JSONSchemaObject;
    constructor(parent: Node, schema: PropertySchema, name: string, value: JSONSchemaObject);
}
export declare class ManagedProperty extends Node<PropertySchema> {
    constructor(parent: ManagedObjectBase, schema: PropertySchema);
    get isScalar(): boolean;
    set value(value: JSONSchemaType);
    get value(): JSONSchemaType;
    getInputType(): any;
}
export declare class ManagedListProperty extends Node<ArrayPropertySchema, JSONSchemaArray> {
    value: JSONSchemaArray;
    items: MangedListItem[];
    constructor(parent: ManagedObjectBase, schema: ArrayPropertySchema, value: JSONSchemaArray);
    get isList(): boolean;
    newItem(index: number): ManagedScalarEntry | ManageObjectEntry;
    add(): ManagedScalarEntry | ManageObjectEntry;
    remove(index: number): void;
    [Symbol.iterator](): ArrayIterator<MangedListItem>;
    item(index: number): ManagedObjectProperty | ManagedScalarEntry | undefined;
    /**
     * remove undefined items from the end of the list if any
     */
    trim(): void;
}
export declare class ManageObjectEntry extends ManagedObjectBase {
    index: number;
    key: string;
    constructor(parent: ManagedListProperty, index: number);
    get isListItem(): boolean;
    set value(value: JSONSchemaObject);
    get value(): JSONSchemaObject;
}
export declare class ManagedScalarEntry extends Node<ArrayPropertySchema> {
    index: number;
    key: string;
    constructor(parent: ManagedListProperty, index: number);
    get isScalar(): boolean;
    get isListItem(): boolean;
    set value(value: JSONSchemaType);
    get value(): JSONSchemaType;
    getInputType(): any;
}
export type MangedListItem = ManagedScalarEntry | ManageObjectEntry;
//# sourceMappingURL=ManagedObject.d.ts.map