/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKindIdentifier, ITreeCursor, forbiddenFieldKindIdentifier, ChangesetLocalId } from "../../core";
import { FieldKind, Multiplicity, FieldChangeHandler, FieldEditor, FieldKindWithEditor } from "../modular-schema";
import { OptionalChangeset } from "./defaultFieldChangeTypes";
/**
 * ChangeHandler that only handles no-op / identity changes.
 */
export declare const noChangeHandler: FieldChangeHandler<0>;
export interface ValueFieldEditor extends FieldEditor<OptionalChangeset> {
    /**
     * Creates a change which replaces the current value of the field with `newValue`.
     * @param newContent - the new content for the field
     * @param changeId - the ID associated with the replacement of the current content.
     * @param buildId - the ID associated with the creation of the `newContent`.
     */
    set(newContent: ITreeCursor, changeId: ChangesetLocalId, buildId: ChangesetLocalId): OptionalChangeset;
}
/**
 * 0 or 1 items.
 */
export declare const optional: FieldKindWithEditor<import("./optionalField").OptionalFieldEditor, Multiplicity.Optional, "Optional">;
export declare const valueFieldEditor: ValueFieldEditor;
export declare const valueChangeHandler: FieldChangeHandler<OptionalChangeset, ValueFieldEditor>;
/**
 * Exactly one item.
 */
export declare const required: FieldKindWithEditor<ValueFieldEditor, Multiplicity.Single, "Value">;
/**
 * 0 or more items.
 */
export declare const sequence: FieldKindWithEditor<import("../sequence-field").SequenceFieldEditor, Multiplicity.Sequence, "Sequence">;
/**
 * Exactly one identifier.
 */
export declare const nodeKey: FieldKindWithEditor<FieldEditor<0>, Multiplicity.Single, "NodeKey">;
/**
 * Exactly 0 items.
 *
 * Using Forbidden makes what types are listed for allowed in a field irrelevant
 * since the field will never have values in it.
 *
 * Using Forbidden is equivalent to picking a kind that permits empty (like sequence or optional)
 * and having no allowed types (or only never types).
 * Because of this, its possible to express everything constraint wise without Forbidden,
 * but using Forbidden can be more semantically clear than optional with no allowed types.
 *
 * For view schema, this can be useful if you need to:
 * - run a specific out of schema handler when a field is present,
 * but otherwise are ignoring or tolerating (ex: via extra fields) unmentioned fields.
 * - prevent a specific field from being used as an extra field
 * (perhaps for some past of future compatibility reason)
 * - keep a field in a schema for metadata purposes
 * (ex: for improved error messaging, error handling or documentation)
 * that is not used in this specific version of the schema (ex: to document what it was or will be used for).
 *
 * For stored schema, this can be useful if you need to:
 * - have a field which can have its schema updated to Optional or Sequence of any type.
 * - to exclude a field from extra fields
 * - for the schema system to use as a default for fields which aren't declared
 * (ex: when updating a field that did not exist into one that does)
 *
 * See {@link emptyField} for a constant, reusable field using Forbidden.
 */
export declare const forbidden: FieldKindWithEditor<FieldEditor<0>, Multiplicity.Forbidden, "Forbidden">;
/**
 * Default field kinds by identifier
 */
export declare const fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>;
/**
 * @alpha
 */
export interface Required extends FieldKind<"Value", Multiplicity.Single> {
}
/**
 * @alpha
 */
export interface Optional extends FieldKind<"Optional", Multiplicity.Optional> {
}
/**
 * @alpha
 */
export interface Sequence extends FieldKind<"Sequence", Multiplicity.Sequence> {
}
/**
 * @alpha
 */
export interface NodeKeyFieldKind extends FieldKind<"NodeKey", Multiplicity.Single> {
}
/**
 * @alpha
 */
export interface Forbidden extends FieldKind<typeof forbiddenFieldKindIdentifier, Multiplicity.Forbidden> {
}
/**
 * Default FieldKinds with their editor types erased.
 * @alpha
 */
export declare const FieldKinds: {
    readonly required: Required;
    readonly optional: Optional;
    readonly sequence: Sequence;
    readonly nodeKey: NodeKeyFieldKind;
    readonly forbidden: Forbidden;
};
//# sourceMappingURL=defaultFieldKinds.d.ts.map