/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { AnchorNode, FieldKey, TreeNodeSchemaIdentifier } from "../core/index.js";
import { FlexTreeContext, FlexTreeEntityKind, FlexTreeField, FlexTreeNode, FlexTreeNodeEvents, FlexTreeNodeSchema, FlexTreeTypedNode, TreeStatus, flexTreeMarker } from "../feature-libraries/index.js";
/** Stores the content of the raw node, i.e. the data that was passed to the factory */
export declare const nodeContent: unique symbol;
interface HasNodeContent<T> {
    [nodeContent]: T;
}
/**
 * Retrieve the content of a raw object node created via {@link createRawNode}.
 * @remarks
 * Raw nodes should only ever be processed as input once.
 * Therefore, this extraction removes the content from the node and will error if called twice on the same node.
 */
export declare function extractRawNodeContent(node: object): object | undefined;
/**
 * Node that pretends to satisfy the given schema while wrapping the given node content.
 * Retrieve the node content via {@link extractRawNodeContent}.
 *
 * @remarks This is useful for creating "raw" nodes: nodes which capture data about a pending insertion but are not yet inserted.
 * These raw nodes can be then used on the right-hand side of an assignment (via `=`) to the tree.
 * However, many of their properties and methods are currently unimplemented and will error if accessed.
 */
export declare abstract class RawTreeNode<TSchema extends FlexTreeNodeSchema, TContent> implements FlexTreeNode, HasNodeContent<TContent> {
    #private;
    readonly schema: TSchema;
    readonly [flexTreeMarker]: FlexTreeEntityKind.Node;
    readonly [nodeContent]: TContent;
    readonly type: TreeNodeSchemaIdentifier;
    constructor(schema: TSchema, content: TContent);
    get context(): FlexTreeContext;
    get parentField(): {
        parent: FlexTreeField;
        index: number;
    };
    is<TSchemaInner extends FlexTreeNodeSchema>(schema: TSchemaInner): this is FlexTreeTypedNode<TSchemaInner>;
    tryGetField(key: FieldKey): FlexTreeField | undefined;
    getBoxed(key: string): never;
    boxedIterator(): IterableIterator<FlexTreeField>;
    treeStatus(): TreeStatus;
    value: undefined;
    on<K extends keyof FlexTreeNodeEvents>(eventName: K, listener: FlexTreeNodeEvents[K]): () => void;
    get anchorNode(): AnchorNode;
}
export declare function rawError(message?: string): Error;
export {};
//# sourceMappingURL=rawNode.d.ts.map