/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { DefaultEditBuilder, } from "../feature-libraries/index.js";
/**
 * Implementation of {@link IDefaultEditBuilder} based on the default set of supported field kinds.
 * @sealed
 */
export class SharedTreeEditBuilder extends DefaultEditBuilder {
    constructor(modularChangeFamily, changeReceiver) {
        super(modularChangeFamily, (change) => changeReceiver({
            changes: [{ type: "data", innerChange: change }],
        }));
        this.changeReceiver = changeReceiver;
        this.schema = {
            setStoredSchema: (oldSchema, newSchema) => {
                this.changeReceiver({
                    changes: [
                        {
                            type: "schema",
                            innerChange: {
                                schema: { new: newSchema, old: oldSchema },
                                isInverse: false,
                            },
                        },
                    ],
                });
            },
        };
    }
}
//# sourceMappingURL=sharedTreeEditBuilder.js.map