/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKinds, SchemaBuilder } from "../../feature-libraries";
import { ValueSchema } from "../../core";
const builder = new SchemaBuilder("Json Domain");
/**
 * @alpha
 */
export const jsonNumber = builder.leaf("Json.Number", ValueSchema.Number);
/**
 * @alpha
 */
export const jsonString = builder.leaf("Json.String", ValueSchema.String);
/**
 * @alpha
 */
export const jsonNull = builder.struct("Json.Null", {});
/**
 * @alpha
 */
export const jsonBoolean = builder.leaf("Json.Boolean", ValueSchema.Boolean);
const jsonPrimitives = [jsonNumber, jsonString, jsonNull, jsonBoolean];
/**
 * Types allowed as roots of Json content.
 * @alpha
 */
export const jsonRoot = [() => jsonObject, () => jsonArray, ...jsonPrimitives];
{
}
/**
 * @alpha
 */
export const jsonObject = builder.mapRecursive("Json.Object", SchemaBuilder.fieldRecursive(FieldKinds.optional, ...jsonRoot));
/**
 * @alpha
 */
export const jsonArray = builder.fieldNodeRecursive("Json.Array", SchemaBuilder.fieldRecursive(FieldKinds.sequence, ...jsonRoot));
/**
 * @alpha
 */
export const jsonSchema = builder.intoLibrary();
//# sourceMappingURL=jsonDomainSchema.js.map