import { draggableItemCompareFn as n } from "../../../utilities/dnd/draggableItemCompareFn.es.es.js";
const a = (t, o = null) => t.filter((e) => e.parentId === o).sort(n).map((e) => {
  const r = a(t, e.id);
  return {
    ...e,
    nodes: r.length > 0 ? r : void 0
  };
});
export {
  a as listToTree
};
//# sourceMappingURL=listToTree.es.es.js.map
