import '../../../globals.js';
// Copyright 2022-2024, University of Colorado Boulder
/**
 * A trait for subtypes of Node, used to prevent children being added/removed to that subtype of Node.
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import memoize from '../../../phet-core/js/memoize.js';
import { scenery } from '../imports.js';
const Leaf = memoize((type) => {
    return class LeafMixin extends type {
        constructor(...args) {
            super(...args);
        }
        insertChild(index, node) {
            throw new Error('Attempt to insert child into Leaf');
        }
        removeChildWithIndex(node, indexOfChild) {
            throw new Error('Attempt to remove child from Leaf');
        }
    };
});
scenery.register('Leaf', Leaf);
export default Leaf;
//# sourceMappingURL=Leaf.js.map