{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "choicebox-controlled-example",
  "title": "Choicebox Controlled",
  "description": "choicebox-controlled-example",
  "dependencies": [
    "react-aria-components"
  ],
  "registryDependencies": [
    "https://intentui.com/r/choice-box",
    "https://intentui.com/r/field"
  ],
  "files": [
    {
      "path": "src/components/examples/collections/choicebox/choicebox-controlled-example.tsx",
      "content": "'use client'\n\nimport { useState } from 'react'\nimport type { Selection } from 'react-aria-components/GridList'\nimport { ChoiceBox, ChoiceBoxItem } from '@/components/ui/choice-box'\nimport { Description } from '@/components/ui/field'\n\nexport default function ChoiceboxControlledDemo() {\n  const [selectedKeys, setSelectedKeys] = useState<Selection>(new Set([packages[0].id]))\n  return (\n    <>\n      <ChoiceBox\n        aria-label=\"Select packages\"\n        selectionMode=\"multiple\"\n        selectedKeys={selectedKeys}\n        onSelectionChange={setSelectedKeys}\n        items={packages}\n      >\n        {(item) => <ChoiceBoxItem textValue={item.label} {...item} />}\n      </ChoiceBox>\n\n      <Description className=\"mt-2 block text-muted-fg [&>strong]:text-fg\">\n        You have selected: <strong>{Array.from(selectedKeys).join(', ')}</strong>\n      </Description>\n    </>\n  )\n}\n\nconst packages = [\n  {\n    id: 'sm',\n    label: 'Small',\n    description: 'Perfect for beginners. Basic resources for light projects.',\n  },\n  {\n    id: 'md',\n    label: 'Medium',\n    description: 'Great for growing sites. More power and storage.',\n  },\n  {\n    id: 'lg',\n    label: 'Large',\n    description: 'Ideal for busy sites. Lots of resources and support.',\n  },\n  {\n    id: 'xl',\n    label: 'Extra Large',\n    description: 'Max power for demanding applications. Top-tier performance.',\n  },\n] as const\n",
      "type": "registry:page",
      "target": "app/choicebox-controlled-example/page.tsx"
    }
  ],
  "type": "registry:page"
}