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