/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { brand, brandedStringType } from "../../util";
/**
 * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.
 */
export const TreeNodeSchemaIdentifierSchema = brandedStringType();
/**
 * TypeBox Schema for encoding {@link FieldKey} in persisted data.
 */
export const FieldKeySchema = brandedStringType();
export const FieldKindIdentifierSchema = brandedStringType();
/**
 * Schema for what {@link TreeValue} is allowed on a Leaf node.
 * @alpha
 *
 * @privateRemarks
 * This is currently leaked into some persisted formats.
 * A full audit of persisted formats is needed,
 * and all types which are used in them should be moved to locations which indicated they are persisted, or duplicated into a persisted and non-persisted version with explicit encoding between them.
 */
export var ValueSchema;
(function (ValueSchema) {
    ValueSchema[ValueSchema["Number"] = 0] = "Number";
    ValueSchema[ValueSchema["String"] = 1] = "String";
    ValueSchema[ValueSchema["Boolean"] = 2] = "Boolean";
    ValueSchema[ValueSchema["FluidHandle"] = 3] = "FluidHandle";
    ValueSchema[ValueSchema["Null"] = 4] = "Null";
})(ValueSchema || (ValueSchema = {}));
/**
 * Identifier used for the FieldKind for fields which must be empty.
 *
 * @remarks
 * This mainly show up in:
 * 1. The root default field for documents.
 * 2. The schema used for out of schema fields (which thus must be empty/not exist) on object and leaf nodes.
 *
 * @alpha
 */
export const forbiddenFieldKindIdentifier = "Forbidden";
export const storedEmptyFieldSchema = {
    kind: { identifier: brand(forbiddenFieldKindIdentifier) },
    types: undefined,
};
//# sourceMappingURL=schema.js.map