"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.IterableTreeListContent = exports.create = exports.TreeArrayNode = void 0;
/**
 * A {@link TreeNode} which implements 'readonly T[]' and the list mutation APIs.
 * @public
 */
exports.TreeArrayNode = {
    /**
     * Wrap an iterable of items to inserted as consecutive items in a list.
     * @remarks
     * The object returned by this function can be inserted into a {@link (TreeArrayNode:interface)}.
     * Its contents will be inserted consecutively in the corresponding location in the list.
     * @example
     * ```ts
     * list.insertAtEnd(TreeArrayNode.inline(iterable))
     * ```
     */
    inline: (content) => IterableTreeListContent[exports.create](content),
};
/**
 * Non-exported symbol used to make IterableTreeListContent constructable only from within this file.
 * @public
 */
exports.create = Symbol("Create IterableTreeListContent");
/**
 * Used to insert iterable content into a {@link (TreeArrayNode:interface)}.
 * Use {@link (TreeArrayNode:variable).inline} to create an instance of this type.
 * @public
 */
class IterableTreeListContent {
    constructor(content) {
        this.content = content;
    }
    /**
     * Package internal construction API.
     * Use {@link (TreeArrayNode:variable).inline} to create an instance of this type instead.
     */
    static [exports.create](content) {
        return new IterableTreeListContent(content);
    }
    /**
     * Iterates over content for nodes to insert.
     */
    [Symbol.iterator]() {
        return this.content[Symbol.iterator]();
    }
}
exports.IterableTreeListContent = IterableTreeListContent;
//# sourceMappingURL=treeListNode.js.map