function formatOrganizationTreeLabel(name, depth) {
  if (depth <= 0) return name;
  const indent = "\xA0".repeat(Math.max(0, (depth - 1) * 2));
  return `${indent}\u21B3 ${name}`;
}
function buildOrganizationTreeOptions(nodes, exclude = /* @__PURE__ */ new Set(), acc = [], depth = 0) {
  for (const node of nodes) {
    const nodeDepth = typeof node.depth === "number" ? node.depth : depth;
    if (!exclude.has(node.id)) {
      acc.push({
        value: node.id,
        name: node.name,
        depth: nodeDepth,
        pathLabel: node.pathLabel,
        isActive: node.isActive
      });
    }
    if (node.children && node.children.length) {
      buildOrganizationTreeOptions(node.children, exclude, acc, nodeDepth + 1);
    }
  }
  return acc;
}
export {
  buildOrganizationTreeOptions,
  formatOrganizationTreeLabel
};
//# sourceMappingURL=tree.js.map
