{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"chat-welcome-01","title":"Chat Welcome","description":"The empty state of a new chat: a greeting, the prompt input and suggestion buttons that start a conversation in one click.","dependencies":["cn","lucide-react"],"registryDependencies":["@sortui/button","@sortui/prompt-input-01"],"files":[{"path":"registry/blocks/chat-welcome-01/components/chat-welcome.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\nimport {\n  ChartColumnIcon,\n  FileTextIcon,\n  ListChecksIcon,\n  MailIcon,\n} from \"lucide-react\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  PromptInput,\n  type PromptSubmission,\n} from \"@/registry/blocks/prompt-input-01/components/prompt-input\"\n\nexport type ChatSuggestion = {\n  label: string\n  prompt: string\n  icon: React.ComponentType\n}\n\nexport const chatSuggestions: ChatSuggestion[] = [\n  {\n    label: \"Summarize feedback\",\n    prompt: \"Summarize this week's customer feedback into the top five themes.\",\n    icon: FileTextIcon,\n  },\n  {\n    label: \"Analyze a funnel\",\n    prompt:\n      \"Where do new users drop off between sign-up and their first project?\",\n    icon: ChartColumnIcon,\n  },\n  {\n    label: \"Plan a sprint\",\n    prompt: \"Turn these feature requests into a two-week sprint plan.\",\n    icon: ListChecksIcon,\n  },\n  {\n    label: \"Write an email\",\n    prompt: \"Write a short email announcing dark mode to our beta users.\",\n    icon: MailIcon,\n  },\n]\n\nexport function ChatWelcome({\n  greeting = \"What can I help with?\",\n  suggestions = chatSuggestions,\n  onSubmit,\n  autoFocus,\n  className,\n}: {\n  greeting?: string\n  suggestions?: ChatSuggestion[]\n  onSubmit?: (submission: PromptSubmission) => void\n  autoFocus?: boolean\n  className?: string\n}) {\n  return (\n    <div\n      className={cn(\n        \"mx-auto flex w-full max-w-3xl flex-col items-center gap-8 px-4\",\n        className\n      )}\n    >\n      <h1 className=\"text-center text-3xl font-semibold text-balance\">\n        {greeting}\n      </h1>\n      <PromptInput onSubmit={onSubmit} autoFocus={autoFocus} />\n      <div className=\"flex flex-wrap justify-center gap-2\">\n        {suggestions.map(({ label, prompt, icon: Icon }) => (\n          <Button\n            key={label}\n            variant=\"outline\"\n            size=\"sm\"\n            onClick={() => onSubmit?.({ text: prompt, files: [], tool: null })}\n          >\n            <Icon data-icon=\"inline-start\" />\n            {label}\n          </Button>\n        ))}\n      </div>\n    </div>\n  )\n}\n","type":"registry:component"}],"cssVars":{"theme":{"text-3xl--letter-spacing":"-0.02em"}},"meta":{"kind":"block","pro":false,"iframeHeight":520},"categories":["ai"],"type":"registry:block"}