{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sources",
  "registryDependencies": [
    "https://taki-ui.com/r/disclosure.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ai-elements/sources.tsx",
      "content": "\"use client\"\n\nimport type { ComponentProps } from \"react\"\nimport { BookIcon, ChevronDownIcon } from \"lucide-react\"\nimport { Button } from \"react-aria-components\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Disclosure, DisclosurePanel } from \"@/registry/new-york/ui/disclosure\"\n\nexport type SourcesProps = ComponentProps<\"div\">\n\nexport const Sources = ({ className, ...props }: SourcesProps) => (\n  <Disclosure\n    className={cn(\"not-prose text-primary mb-4 text-xs\", className)}\n    {...props}\n  />\n)\n\nexport type SourcesTriggerProps = ComponentProps<typeof Button> & {\n  count: number\n}\n\nexport const SourcesTrigger = ({\n  className,\n  count,\n  children,\n  ...props\n}: SourcesTriggerProps) => (\n  <Button\n    slot=\"trigger\"\n    className={cn(\"flex items-center gap-2\", className)}\n    {...props}\n  >\n    {children ?? (\n      <>\n        <p className=\"font-medium\">Used {count} sources</p>\n        <ChevronDownIcon className=\"h-4 w-4\" />\n      </>\n    )}\n  </Button>\n)\n\nexport type SourcesContentProps = ComponentProps<typeof DisclosurePanel>\n\nexport const SourcesContent = ({\n  className,\n  ...props\n}: SourcesContentProps) => (\n  <DisclosurePanel\n    className={cn(\n      \"mt-3 flex w-fit flex-col gap-2\",\n      \"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in outline-none\",\n      className\n    )}\n    {...props}\n  />\n)\n\nexport type SourceProps = ComponentProps<\"a\">\n\nexport const Source = ({ href, title, children, ...props }: SourceProps) => (\n  <a\n    className=\"flex items-center gap-2\"\n    href={href}\n    rel=\"noreferrer\"\n    target=\"_blank\"\n    {...props}\n  >\n    {children ?? (\n      <>\n        <BookIcon className=\"h-4 w-4\" />\n        <span className=\"block font-medium\">{title}</span>\n      </>\n    )}\n  </a>\n)\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}