{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tree-selection",
  "registryDependencies": [
    "https://taki-ui.com/r/tree.json"
  ],
  "files": [
    {
      "path": "registry/new-york/examples/tree-selection.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport { Tree, TreeItem } from \"@/registry/new-york/ui/tree\"\n\nexport default function TreeSelectionDemo() {\n  const [selected, setSelected] = useState<Set<string>>(\n    new Set([\"photos\", \"vacation\"])\n  )\n\n  return (\n    <div className=\"flex flex-col gap-4\">\n      <Tree\n        aria-label=\"Files\"\n        className=\"w-64\"\n        selectionMode=\"multiple\"\n        selectedKeys={selected}\n        onSelectionChange={(keys) => setSelected(keys as Set<string>)}\n        defaultExpandedKeys={[\"documents\", \"photos\", \"vacation\"]}\n      >\n        <TreeItem id=\"documents\" title=\"Documents\">\n          <TreeItem id=\"project\" title=\"Project\">\n            <TreeItem id=\"report\" title=\"Weekly Report\" />\n            <TreeItem id=\"presentation\" title=\"Presentation\" />\n          </TreeItem>\n          <TreeItem id=\"budget\" title=\"Budget\" />\n        </TreeItem>\n        <TreeItem id=\"photos\" title=\"Photos\">\n          <TreeItem id=\"vacation\" title=\"Vacation\">\n            <TreeItem id=\"beach\" title=\"Beach\" />\n            <TreeItem id=\"mountains\" title=\"Mountains\" />\n          </TreeItem>\n          <TreeItem id=\"family\" title=\"Family\" />\n        </TreeItem>\n        <TreeItem id=\"videos\" title=\"Videos\">\n          <TreeItem id=\"tutorials\" title=\"Tutorials\" />\n        </TreeItem>\n      </Tree>\n      <div className=\"text-muted-foreground text-sm\">\n        Selected: {Array.from(selected).join(\", \")}\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}