"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.reservedObjectNodeFieldPropertyNamePrefixes = exports.reservedObjectNodeFieldPropertyNames = exports.onNextChange = exports.TreeStatus = exports.FlexTreeEntityKind = exports.isFlexTreeNode = exports.isFlexTreeEntity = exports.flexTreeMarker = void 0;
/**
 * Indicates that an object is a flex tree.
 * @internal
 */
exports.flexTreeMarker = Symbol("flexTreeMarker");
function isFlexTreeEntity(t) {
    return typeof t === "object" && t !== null && exports.flexTreeMarker in t;
}
exports.isFlexTreeEntity = isFlexTreeEntity;
function isFlexTreeNode(t) {
    return isFlexTreeEntity(t) && t[exports.flexTreeMarker] === FlexTreeEntityKind.Node;
}
exports.isFlexTreeNode = isFlexTreeNode;
/**
 * @internal
 */
var FlexTreeEntityKind;
(function (FlexTreeEntityKind) {
    FlexTreeEntityKind[FlexTreeEntityKind["Node"] = 0] = "Node";
    FlexTreeEntityKind[FlexTreeEntityKind["Field"] = 1] = "Field";
})(FlexTreeEntityKind || (exports.FlexTreeEntityKind = FlexTreeEntityKind = {}));
/**
 * Status of the tree that a particular node belongs to.
 * @public
 */
var TreeStatus;
(function (TreeStatus) {
    /**
     * Is parented under the root field.
     */
    TreeStatus[TreeStatus["InDocument"] = 0] = "InDocument";
    /**
     * Is not parented under the root field, but can be added back to the original document tree.
     */
    TreeStatus[TreeStatus["Removed"] = 1] = "Removed";
    /**
     * Is removed and cannot be added back to the original document tree.
     */
    TreeStatus[TreeStatus["Deleted"] = 2] = "Deleted";
})(TreeStatus || (exports.TreeStatus = TreeStatus = {}));
/**
 * {@inheritdoc TreeNode.[onNextChange]}
 * @internal
 */
exports.onNextChange = Symbol("onNextChange");
/**
 * Reserved object node field property names to avoid collisions with the rest of the object node API.
 * @internal
 */
exports.reservedObjectNodeFieldPropertyNames = [
    "constructor",
    "context",
    "is",
    "on",
    "parentField",
    "schema",
    "treeStatus",
    "tryGetField",
    "type",
    "value",
    "localNodeKey",
    "boxedIterator",
    "iterator",
];
/**
 * Reserved object node field property names prefixes.
 * These are reserved to avoid collisions with properties derived from field other field names.
 *
 * Field names starting with these must be followed by a lowercase letter, or be escaped.
 * @internal
 */
exports.reservedObjectNodeFieldPropertyNamePrefixes = [
    "set",
    "boxed",
    "field",
    "Field",
];
// #endregion
//# sourceMappingURL=flexTreeTypes.js.map