/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Type } from "@sinclair/typebox";
import { TreeSchemaIdentifierSchema } from "../schema-stored";
export const EncodedFieldMapObject = (tChild) => Type.Record(Type.String(), Type.Array(tChild));
export const EncodedNodeData = Type.Object({
    value: Type.Optional(Type.Any()),
    type: Type.Readonly(TreeSchemaIdentifierSchema),
});
export const EncodedGenericFieldsNode = (tChild) => Type.Object({
    fields: Type.Optional(EncodedFieldMapObject(tChild)),
    globalFields: Type.Optional(EncodedFieldMapObject(tChild)),
});
export const EncodedGenericTreeNode = (tChild) => Type.Intersect([EncodedGenericFieldsNode(tChild), EncodedNodeData]);
export const EncodedJsonableTree = Type.Recursive((Self) => EncodedGenericTreeNode(Self));
//# sourceMappingURL=persistedTreeTextFormat.js.map