{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "popover3",
  "title": "Popover",
  "description": "Displays rich content in a portal, triggered by a button. Each popover example works with positioning primitives from Radix UI and Base UI.",
  "registryDependencies": [
    "button",
    "popover"
  ],
  "files": [
    {
      "path": "contents/components/popover/3/index.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\n\nconst tips = [\n  {\n    description:\n      \"This is your new workspace. Here you'll find all your projects, recent activities, settings, and more.\",\n    title: \"Welcome to Dashboard\"\n  },\n  {\n    description:\n      \"Use the toolbar above to create new projects, invite team members, or access settings.\",\n    title: \"Quick Actions\"\n  },\n  {\n    description:\n      \"Click the support icon in the top right corner to access our help center and documentation.\",\n    title: \"Need Help?\"\n  }\n];\n\nexport default function PopoverComponent() {\n  const [currentTip, setCurrentTip] = useState(0);\n\n  const handleNavigation = () => {\n    if (currentTip === tips.length - 1) {\n      setCurrentTip(0);\n    } else {\n      setCurrentTip(currentTip + 1);\n    }\n  };\n\n  return (\n    <Popover>\n      <PopoverTrigger asChild>\n        <Button variant=\"outline\">Tooltip-like with steps</Button>\n      </PopoverTrigger>\n      <PopoverContent className=\"max-w-[280px] py-3 shadow-none\" side=\"top\">\n        <div className=\"space-y-3\">\n          <div className=\"space-y-1\">\n            <p className=\"text-[13px] font-medium\">{tips[currentTip].title}</p>\n            <p className=\"text-muted-foreground text-xs\">{tips[currentTip].description}</p>\n          </div>\n          <div className=\"flex items-center justify-between gap-2\">\n            <span className=\"text-muted-foreground text-xs\">\n              {currentTip + 1}/{tips.length}\n            </span>\n            <button\n              className=\"text-xs font-medium hover:underline\"\n              onClick={handleNavigation}\n              type=\"button\">\n              {currentTip === tips.length - 1 ? \"Start over\" : \"Next\"}\n            </button>\n          </div>\n        </div>\n      </PopoverContent>\n    </Popover>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/popover3.tsx"
    }
  ],
  "type": "registry:component"
}