"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "initialItemsTransform", {
    enumerable: true,
    get: function() {
        return initialItemsTransform;
    }
});
const initialItemsTransform = (items, parent)=>{
    return [
        ...items
    ].map((item)=>{
        const itemCopy = {
            ...item
        };
        itemCopy.parent = parent;
        if (itemCopy.items) {
            itemCopy.items = initialItemsTransform(itemCopy.items, itemCopy);
        }
        return itemCopy;
    });
};
