/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { type ChangeAtomId, Multiplicity } from "../../core/index.js";
import { requiredIdentifier } from "../fieldKindIdentifiers.js";
import { type FieldEditor, type FieldChangeHandler, FlexFieldKind } from "../modular-schema/index.js";
import type { OptionalChangeset } from "./optionalFieldChangeTypes.js";
/**
 * {@link FieldEditor} for required fields (always contain exactly 1 child).
 * @remarks
 * This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,
 * and the content is always assumed to not be empty.
 * This means the actual edits implemented for optional fields are sufficient to support required fields
 * which is why this is defined and implemented in terms of optional fields.
 */
export interface RequiredFieldEditor 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;
}
export declare const requiredFieldEditor: RequiredFieldEditor;
export declare const requiredFieldChangeHandler: FieldChangeHandler<OptionalChangeset, RequiredFieldEditor>;
interface Required extends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {
}
/**
 * Exactly one item.
 */
export declare const required: Required;
export {};
//# sourceMappingURL=requiredField.d.ts.map