/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { isCursor } from "../../core";
import { typeNameSymbol, valueSymbol, } from "../contextuallyTyped";
import { parentField } from "../untypedTree";
/**
 * A symbol for extracting target from {@link EditableTree} proxies.
 * Useful for debugging and testing, but not part of the public API.
 * @alpha
 */
export const proxyTargetSymbol = Symbol("editable-tree:proxyTarget");
/**
 * A symbol to get the {@link LocalNodeKey} that identifies this {@link EditableTree} node.
 * @alpha
 */
export const localNodeKeySymbol = Symbol("editable-tree:localNodeKey");
/**
 * A symbol to get the function, which replaces the content of a field of {@link EditableTree}.
 * @alpha
 */
export const setField = Symbol("editable-tree:setField()");
/**
 * Check if NewFieldContent is made of {@link ITreeCursor}s.
 *
 * Useful when APIs want to take in tree data in multiple formats, including cursors.
 */
export function areCursors(data) {
    if (isCursor(data)) {
        return true;
    }
    if (Array.isArray(data) && data.length >= 0 && isCursor(data[0])) {
        return true;
    }
    return false;
}
//# sourceMappingURL=editableTreeTypes.js.map