import { findTreeNodesBy } from "../../../../utils/index.js";
function extractLeafIds(tree) {
    const leafNodes = findTreeNodesBy(tree, ()=>true);
    return new Set(leafNodes.map((node)=>node.id));
}
const treeTreeToColumns = (tree, callback)=>{
    const result = tree.map((item)=>{
        const props = callback?.(item) || {};
        if ('children' in item && Array.isArray(item.children)) return {
            ...props,
            columns: treeTreeToColumns(item.children, callback)
        };
        return props;
    });
    return result || [];
};
export { extractLeafIds, treeTreeToColumns };

//# sourceMappingURL=utils.js.map