{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-conversation",
  "title": "Ai Conversation",
  "dependencies": [
    "@heroicons/react@2.2.0",
    "use-stick-to-bottom@1.1.1"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://ui.orchid.ai/r/orchid-foundation.json",
    "https://ui.orchid.ai/r/orchid-theme.json",
    "https://ui.orchid.ai/r/z-button.json"
  ],
  "files": [
    {
      "path": "registry/ui/orchid/ai-elements/conversation.tsx",
      "content": "\"use client\";\nimport { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';\nimport type Button from \"../spectrum/atoms/z-button/z-button\";\nimport ZButton from \"../spectrum/atoms/z-button/z-button\";\nimport { ArrowDownIcon } from '@heroicons/react/16/solid';\nimport type { ComponentProps } from 'react';\nimport { useCallback } from 'react';\nimport { cn } from \"../lib/ui-utils\";\nexport type ConversationProps = ComponentProps<typeof StickToBottom>;\nexport const Conversation = ({ className, ...props }: ConversationProps) => (<StickToBottom className={cn('relative flex-1 overflow-y-auto', className)} initial=\"smooth\" resize=\"smooth\" role=\"log\" {...props}/>);\nexport type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;\nexport const ConversationContent = ({ className, ...props }: ConversationContentProps) => (<StickToBottom.Content className={cn(className)} {...props}/>);\nexport type ConversationEmptyStateProps = ComponentProps<'div'> & {\n    title?: string;\n    description?: string;\n    icon?: React.ReactNode;\n};\nexport const ConversationEmptyState = ({ className, title = 'No messages yet', description = 'Start a conversation to see messages here', icon, children, ...props }: ConversationEmptyStateProps) => (<div className={cn('flex size-full flex-col items-center justify-center gap-3 p-8 text-center', className)} {...props}>\n    {children ?? (<>\n        {icon && <div className=\"text-neutral-subtle\">{icon}</div>}\n        <div className=\"space-y-1\">\n          <h3 className=\"text-copy\">{title}</h3>\n          {description && <p className=\"text-neutral-subtle text-copy\">{description}</p>}\n        </div>\n      </>)}\n  </div>);\nexport type ConversationScrollButtonProps = ComponentProps<typeof Button>;\nexport const ConversationScrollButton = ({ className, ...props }: ConversationScrollButtonProps) => {\n    const { isAtBottom, scrollToBottom } = useStickToBottomContext();\n    const handleScrollToBottom = useCallback(() => {\n        scrollToBottom();\n    }, [scrollToBottom]);\n    return (!isAtBottom && (<ZButton className={cn('absolute bottom-4 left-1/2 translate-x-1/2', className)} onClick={handleScrollToBottom} type=\"button\" variant=\"transparent\" leadingIcon={ArrowDownIcon} {...props}/>));\n};\n",
      "type": "registry:ui",
      "target": "@ui/orchid/ai-elements/conversation.tsx"
    }
  ],
  "type": "registry:ui"
}