{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "assistant-modal",
  "type": "registry:component",
  "title": "Assistant Modal",
  "description": "Floating chat bubble for support widgets and help desks.",
  "dependencies": [
    "@assistant-ui/react",
    "lucide-react"
  ],
  "registryDependencies": [
    "https://r.assistant-ui.com/thread.json",
    "https://r.assistant-ui.com/tooltip-icon-button.json"
  ],
  "files": [
    {
      "type": "registry:component",
      "path": "components/assistant-ui/elements/assistant-modal.aui.tsx",
      "sourcePath": "packages/ui/src/components/react/assistant-ui/elements/assistant-modal.aui.radix.tsx",
      "content": "\"use client\";\n\nimport { BotIcon, ChevronDownIcon } from \"lucide-react\";\n\nimport { type FC, forwardRef } from \"react\";\nimport { AssistantModalPrimitive } from \"@assistant-ui/react\";\n\nimport { Thread } from \"@/components/assistant-ui/elements/thread.aui\";\nimport { TooltipIconButton } from \"@/components/assistant-ui/elements/tooltip-icon-button\";\n\nexport const AssistantModal: FC = () => {\n  return (\n    <AssistantModalPrimitive.Root>\n      <AssistantModalPrimitive.Anchor className=\"aui-root aui-modal-anchor fixed end-4 bottom-4 size-11\">\n        <AssistantModalPrimitive.Trigger asChild>\n          <AssistantModalButton />\n        </AssistantModalPrimitive.Trigger>\n      </AssistantModalPrimitive.Anchor>\n      <AssistantModalPrimitive.Content\n        sideOffset={16}\n        className=\"aui-root aui-modal-content bg-popover text-popover-foreground border-border/60 dark:border-muted-foreground/15 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-bottom-2 [&[data-state=open]_.aui-thread-viewport-footer]:animate-in [&[data-state=open]_.aui-thread-viewport-footer]:fade-in-0 [&[data-state=open]_.aui-thread-viewport-footer]:slide-in-from-bottom-2 [&[data-state=open]_.aui-thread-viewport-footer]:fill-mode-backwards [&>.aui-thread-root_.aui-thread-viewport-footer]:bg-popover z-50 h-125 max-h-(--radix-popover-content-available-height) w-100 max-w-[calc(100vw-2rem)] origin-(--radix-popover-content-transform-origin) overflow-clip overscroll-contain rounded-[2.5rem] border p-0 antialiased ease-[cubic-bezier(0.32,0.72,0,1)] outline-none data-[state=closed]:duration-200 data-[state=open]:duration-300 motion-reduce:animate-none motion-reduce:[&_.aui-thread-viewport-footer]:animate-none [&_[data-slot=aui\\_thread-viewport]]:[scrollbar-gutter:stable_both-edges] [&>.aui-thread-root]:bg-inherit [&[data-state=open]_.aui-thread-viewport-footer]:delay-100 [&[data-state=open]_.aui-thread-viewport-footer]:duration-300 [&[data-state=open]_.aui-thread-viewport-footer]:ease-[cubic-bezier(0.32,0.72,0,1)]\"\n      >\n        <Thread />\n      </AssistantModalPrimitive.Content>\n    </AssistantModalPrimitive.Root>\n  );\n};\n\ntype AssistantModalButtonProps = { \"data-state\"?: \"open\" | \"closed\" };\n\nconst AssistantModalButton = forwardRef<\n  HTMLButtonElement,\n  AssistantModalButtonProps\n>(({ \"data-state\": state, ...rest }, ref) => {\n  const tooltip = state === \"open\" ? \"Close Assistant\" : \"Open Assistant\";\n\n  return (\n    <TooltipIconButton\n      variant=\"default\"\n      tooltip={tooltip}\n      side=\"left\"\n      {...rest}\n      className=\"aui-modal-button size-full rounded-full transition-transform duration-150 ease-out hover:scale-105 active:scale-96 motion-reduce:transition-none\"\n      ref={ref}\n    >\n      <BotIcon\n        data-state={state}\n        className=\"aui-modal-button-closed-icon absolute size-6 transition-[scale,opacity,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] data-[state=closed]:scale-100 data-[state=closed]:opacity-100 data-[state=closed]:blur-[0px] data-[state=open]:scale-25 data-[state=open]:opacity-0 data-[state=open]:blur-[4px] motion-reduce:transition-none\"\n      />\n\n      <ChevronDownIcon\n        data-state={state}\n        className=\"aui-modal-button-open-icon absolute size-6 transition-[scale,opacity,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] data-[state=closed]:scale-25 data-[state=closed]:opacity-0 data-[state=closed]:blur-[4px] data-[state=open]:scale-100 data-[state=open]:opacity-100 data-[state=open]:blur-[0px] motion-reduce:transition-none\"\n      />\n      <span className=\"aui-sr-only sr-only\">{tooltip}</span>\n    </TooltipIconButton>\n  );\n});\n\nAssistantModalButton.displayName = \"AssistantModalButton\";\n"
    }
  ]
}