{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navbar30",
  "title": "Centered Logo Split Nav",
  "description": "Symmetrical navbar with centered logo flanked by navigation links on both sides and dropdown menus. Perfect for fashion brands and lifestyle sites wanting balanced visual hierarchy.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/navbar30/navbar30.tsx",
      "content": "\"use client\";\n\nimport { ChevronDown, Menu, X } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ninterface DropdownItem {\n  title: string;\n  href?: string;\n  description?: string;\n}\n\ninterface NavItem {\n  label: string;\n  href?: string;\n  dropdown?: DropdownItem[];\n}\n\ninterface Navbar30Props {\n  logo?: {\n    text: string;\n    href?: string;\n  };\n  leftNavItems?: NavItem[];\n  rightNavItems?: NavItem[];\n  button?: {\n    label: string;\n    href?: string;\n  };\n  className?: string;\n}\n\nexport const navbar30Demo: Navbar30Props = {\n  logo: { text: \"Acme\", href: \"https://beste.co\" },\n  leftNavItems: [\n    {\n      label: \"Products\",\n      dropdown: [\n        {\n          title: \"Analytics\",\n          description: \"Track your metrics\",\n          href: \"https://beste.co\",\n        },\n        {\n          title: \"Automation\",\n          description: \"Streamline workflows\",\n          href: \"https://beste.co\",\n        },\n        {\n          title: \"Insights\",\n          description: \"Data-driven decisions\",\n          href: \"https://beste.co\",\n        },\n      ],\n    },\n    { label: \"Solutions\", href: \"https://beste.co\" },\n    { label: \"Pricing\", href: \"https://beste.co\" },\n  ],\n  rightNavItems: [\n    { label: \"Resources\", href: \"https://beste.co\" },\n    { label: \"Blog\", href: \"https://beste.co\" },\n    { label: \"Contact\", href: \"https://beste.co\" },\n  ],\n  button: { label: \"Get Started\", href: \"https://beste.co\" },\n};\n\nexport function Navbar30({\n  logo,\n  leftNavItems = [],\n  rightNavItems = [],\n  button,\n  className,\n}: Navbar30Props) {\n  const [mobileMenuOpen, setMobileMenuOpen] = useState(false);\n  const [activeDropdown, setActiveDropdown] = useState<string | null>(null);\n  const dropdownRef = useRef<HTMLDivElement>(null);\n\n  useEffect(() => {\n    const handleClickOutside = (event: MouseEvent) => {\n      if (\n        dropdownRef.current &&\n        !dropdownRef.current.contains(event.target as Node)\n      ) {\n        setActiveDropdown(null);\n      }\n    };\n    if (activeDropdown) {\n      document.addEventListener(\"mousedown\", handleClickOutside);\n    }\n    return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n  }, [activeDropdown]);\n\n  const renderNavItem = (item: NavItem) => {\n    const hasDropdown = item.dropdown && item.dropdown.length > 0;\n\n    if (hasDropdown) {\n      return (\n        <div key={item.label} className=\"relative\" ref={dropdownRef}>\n          <Button\n            variant=\"ghost\"\n            onClick={() =>\n              setActiveDropdown(\n                activeDropdown === item.label ? null : item.label\n              )\n            }\n          >\n            {item.label}\n            <ChevronDown\n              className={cn(\n                \"size-4 transition-transform duration-200\",\n                activeDropdown === item.label && \"rotate-180\"\n              )}\n            />\n          </Button>\n\n          {activeDropdown === item.label && (\n            <div className=\"absolute left-0 top-full z-50 mt-2 w-64 rounded-lg border bg-background p-2 shadow-lg\">\n              {item.dropdown?.map((dropdownItem) => (\n                <Link\n                  key={dropdownItem.title}\n                  href={dropdownItem.href ?? \"#\"}\n                  className=\"block rounded-md px-3 py-2 transition-colors hover:bg-accent\"\n                  onClick={() => setActiveDropdown(null)}\n                >\n                  <p className=\"text-sm font-medium\">{dropdownItem.title}</p>\n                  {dropdownItem.description && (\n                    <p className=\"text-xs text-muted-foreground\">\n                      {dropdownItem.description}\n                    </p>\n                  )}\n                </Link>\n              ))}\n            </div>\n          )}\n        </div>\n      );\n    }\n\n    return (\n      <Button key={item.label} variant=\"ghost\" asChild>\n        <Link href={item.href ?? \"#\"}>{item.label}</Link>\n      </Button>\n    );\n  };\n\n  return (\n    <nav\n      className={cn(\n        \"sticky top-0 z-50 w-full border-b bg-background\",\n        className\n      )}\n    >\n      <div className=\"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8\">\n        <div className=\"flex h-16 items-center justify-between\">\n          {/* Left Navigation */}\n          <div className=\"hidden items-center gap-1 lg:flex\">\n            {leftNavItems.map((item) => renderNavItem(item))}\n          </div>\n\n          {/* Centered Logo */}\n          <div className=\"flex flex-1 items-center justify-center lg:flex-none\">\n            <Link\n              href={logo?.href ?? \"#\"}\n              className=\"text-2xl font-bold tracking-tight\"\n            >\n              {logo?.text ?? \"Brand\"}\n            </Link>\n          </div>\n\n          {/* Right Navigation */}\n          <div className=\"hidden items-center gap-1 lg:flex\">\n            {rightNavItems.map((item) => renderNavItem(item))}\n            {button && (\n              <Button size=\"sm\" className=\"ml-4\" asChild>\n                <Link href={button.href ?? \"#\"}>{button.label}</Link>\n              </Button>\n            )}\n          </div>\n\n          {/* Mobile menu button */}\n          <Button\n            variant=\"ghost\"\n            size=\"icon\"\n            className=\"lg:hidden\"\n            onClick={() => setMobileMenuOpen(!mobileMenuOpen)}\n          >\n            {mobileMenuOpen ? (\n              <X className=\"size-5\" />\n            ) : (\n              <Menu className=\"size-5\" />\n            )}\n          </Button>\n        </div>\n      </div>\n\n      {/* Mobile menu */}\n      {mobileMenuOpen && (\n        <div className=\"border-t lg:hidden\">\n          <div className=\"space-y-1 px-4 pb-4 pt-2\">\n            {[...leftNavItems, ...rightNavItems].map((item) => (\n              <div key={item.label}>\n                {item.dropdown ? (\n                  <div className=\"space-y-1\">\n                    <p className=\"px-3 py-2 text-sm font-medium\">\n                      {item.label}\n                    </p>\n                    <div className=\"ml-4 space-y-1 border-l pl-4\">\n                      {item.dropdown.map((dropdownItem) => (\n                        <Link\n                          key={dropdownItem.title}\n                          href={dropdownItem.href ?? \"#\"}\n                          className=\"block rounded-md px-3 py-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground\"\n                          onClick={() => setMobileMenuOpen(false)}\n                        >\n                          {dropdownItem.title}\n                        </Link>\n                      ))}\n                    </div>\n                  </div>\n                ) : (\n                  <Link\n                    href={item.href ?? \"#\"}\n                    className=\"block rounded-md px-3 py-2 text-sm hover:bg-accent\"\n                    onClick={() => setMobileMenuOpen(false)}\n                  >\n                    {item.label}\n                  </Link>\n                )}\n              </div>\n            ))}\n            {button && (\n              <div className=\"pt-4\">\n                <Button className=\"w-full\" asChild>\n                  <Link href={button.href ?? \"#\"}>{button.label}</Link>\n                </Button>\n              </div>\n            )}\n          </div>\n        </div>\n      )}\n    </nav>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/navbar30.tsx"
    }
  ],
  "type": "registry:block"
}