{
  "name": "chat",
  "type": "registry:ui",
  "framework": "react",
  "title": "Chat",
  "description": "The channel shell: a scrolling message log with the composer pinned below it.",
  "registryDependencies": [
    "@newtui/scrollbar",
    "@newtui/message-list",
    "@newtui/message-composer"
  ],
  "files": [
    {
      "path": "ui/chat.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { ScrollArea } from \"@/registry/bases/newt/ui/scrollbar\"\n\n/* The channel shell: a scrolling message log with the composer pinned below. */\nconst Chat = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n  ({ className, ...props }, ref) => (\n    <section\n      ref={ref}\n      className={cn(\n        \"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-newt-bg-elevated\",\n        className\n      )}\n      {...props}\n    />\n  )\n)\nChat.displayName = \"Chat\"\n\nexport interface ChatBodyProps extends React.ComponentProps<\n  typeof ScrollArea\n> {}\n\nconst ChatBody = React.forwardRef<HTMLDivElement, ChatBodyProps>(\n  ({ className, children, ...props }, ref) => (\n    <ScrollArea\n      ref={ref}\n      className={cn(\"min-h-0 flex-1\", className)}\n      {...props}\n    >\n      {/*\n       * Pins a short conversation to the bottom of the scrollport, the way a\n       * channel with three messages still reads from the composer upwards.\n       */}\n      <div className=\"flex min-h-full flex-col justify-end\">{children}</div>\n    </ScrollArea>\n  )\n)\nChatBody.displayName = \"ChatBody\"\n\nconst ChatFooter = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div ref={ref} className={cn(\"shrink-0 px-4 pb-4\", className)} {...props} />\n))\nChatFooter.displayName = \"ChatFooter\"\n\nexport { Chat, ChatBody, ChatFooter }\n",
      "type": "registry:ui"
    }
  ]
}