/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type ChangeAtomId, type FieldKindIdentifier, forbiddenFieldKindIdentifier, Multiplicity } from "../../core/index.js";
import { type FieldChangeHandler, type FieldEditor, type FieldKindConfiguration, FieldKindWithEditor, type FlexFieldKind } from "../modular-schema/index.js";
import { type OptionalChangeset } from "../optional-field/index.js";
/**
 * 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 ids - The ids for the fill and detach fields.
     */
    set(ids: {
        fill: ChangeAtomId;
        detach: ChangeAtomId;
    }): OptionalChangeset;
}
/**
 * 0 or 1 items.
 */
export declare const optional: FieldKindWithEditor<import("../optional-field/optionalField.js").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.js").SequenceFieldEditor, Multiplicity.Sequence, "Sequence">;
/**
 * Exactly one identifier.
 */
export declare const nodeKey: FieldKindWithEditor<FieldEditor<0>, Multiplicity.Single, "NodeKey">;
/**
 * Exactly one identifier.
 */
export declare const identifier: FieldKindWithEditor<FieldEditor<0>, Multiplicity.Single, "Identifier">;
/**
 * 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">;
export declare const fieldKindConfigurations: ReadonlyMap<number, FieldKindConfiguration>;
/**
 * All supported field kinds.
 *
 * @privateRemarks
 * Before making a SharedTree format change which impacts which set of field kinds are allowed,
 * code which uses this should be audited for compatibility considerations.
 */
export declare const fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor>;
/**
 */
export interface Required extends FlexFieldKind<"Value", Multiplicity.Single> {
}
/**
 */
export interface Optional extends FlexFieldKind<"Optional", Multiplicity.Optional> {
}
/**
 */
export interface Sequence extends FlexFieldKind<"Sequence", Multiplicity.Sequence> {
}
/**
 */
export interface Identifier extends FlexFieldKind<"Identifier", Multiplicity.Single> {
}
/**
 */
export interface Forbidden extends FlexFieldKind<typeof forbiddenFieldKindIdentifier, Multiplicity.Forbidden> {
}
/**
 * Default FieldKinds with their editor types erased.
 */
export declare const FieldKinds: {
    readonly required: Required;
    readonly optional: Optional;
    readonly sequence: Sequence;
    readonly identifier: Identifier;
    readonly forbidden: Forbidden;
};
//# sourceMappingURL=defaultFieldKinds.d.ts.map