{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "p-composer-3",
  "description": "Composer pinned below scrollable drawer content",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "@coss/button",
    "@coss/composer",
    "@coss/drawer"
  ],
  "files": [
    {
      "path": "registry/default/particles/p-composer-3.tsx",
      "content": "\"use client\";\n\nimport { ArrowUpIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { Button } from \"@/registry/default/ui/button\";\nimport {\n  Composer,\n  ComposerActionGroup,\n  ComposerActions,\n  ComposerInput,\n  ComposerItem,\n  type ComposerItemValue,\n  ComposerList,\n  ComposerPopup,\n  ComposerSubmit,\n  type ComposerValue,\n} from \"@/registry/default/ui/composer\";\nimport {\n  Drawer,\n  DrawerHeader,\n  DrawerPanel,\n  DrawerPopup,\n  DrawerTitle,\n  DrawerTrigger,\n} from \"@/registry/default/ui/drawer\";\n\nconst blocks = Array.from({ length: 32 }, (_, index) => `block-${index}`);\n\nconst people = [\n  { id: \"alex\", label: \"Alex Morgan\" },\n  { id: \"sam\", label: \"Sam Rivera\" },\n];\n\nconst actions = [\n  { id: \"summarize\", label: \"Summarize\", type: \"action\" as const },\n  { id: \"rewrite\", label: \"Rewrite\", type: \"action\" as const },\n];\n\nexport default function Particle() {\n  const [value, setValue] = useState<ComposerValue>([]);\n\n  return (\n    <Drawer>\n      <DrawerTrigger render={<Button variant=\"outline\" />}>\n        Open composer drawer\n      </DrawerTrigger>\n      <DrawerPopup className=\"[--drawer-height:calc(100dvh-3rem)]\" showBar>\n        <DrawerHeader>\n          <DrawerTitle>Chat</DrawerTitle>\n        </DrawerHeader>\n        <div className=\"min-h-0 flex-1\">\n          <DrawerPanel>\n            <div aria-hidden=\"true\" className=\"flex flex-col gap-2\">\n              {blocks.map((key) => (\n                <div className=\"h-12 shrink-0 rounded-xl bg-muted\" key={key} />\n              ))}\n            </div>\n          </DrawerPanel>\n        </div>\n        <Composer\n          className=\"mx-3 mb-3\"\n          value={value}\n          onValueChange={setValue}\n          onSubmit={() => setValue([])}\n          triggers={[\n            { character: \"@\", items: people },\n            { character: \"/\", items: actions },\n          ]}\n        >\n          <ComposerInput aria-label=\"Message\" placeholder=\"Write a message…\" />\n          <ComposerPopup>\n            <ComposerList>\n              {(item: ComposerItemValue) => (\n                <ComposerItem key={item.id} value={item}>\n                  {item.label}\n                </ComposerItem>\n              )}\n            </ComposerList>\n          </ComposerPopup>\n          <ComposerActions>\n            <ComposerActionGroup align=\"end\">\n              <ComposerSubmit\n                render={\n                  <Button aria-label=\"Send message\" size=\"icon\">\n                    <ArrowUpIcon aria-hidden=\"true\" />\n                  </Button>\n                }\n              />\n            </ComposerActionGroup>\n          </ComposerActions>\n        </Composer>\n      </DrawerPopup>\n    </Drawer>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "categories": [
    "composer",
    "drawer"
  ],
  "type": "registry:block"
}