"use client" import { useState } from 'react' import Link from 'next/link' import { Menu, Github, LayoutDashboard, ChevronDown, X, Moon, Sun } from 'lucide-react' import { Button } from '@/components/ui/button' import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, } from '@/components/ui/navigation-menu' import { Sheet, SheetContent, SheetTrigger, SheetHeader, SheetTitle } from '@/components/ui/sheet' import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '@/components/ui/collapsible' import { Logo } from '@/components/logo' import { MegaMenu } from '@/components/landing/mega-menu' import { ModeToggle } from '@/components/mode-toggle' import { useTheme } from '@/hooks/use-theme' const navigationItems = [ { name: 'Home', href: '#hero' }, { name: 'Features', href: '#features' }, { name: 'Solutions', href: '#features', hasMegaMenu: true }, { name: 'Team', href: '#team' }, { name: 'Pricing', href: '#pricing' }, { name: 'FAQ', href: '#faq' }, { name: 'Contact', href: '#contact' }, ] // Solutions menu items for mobile const solutionsItems = [ { title: 'Browse Products' }, { name: 'Free Blocks', href: '#free-blocks' }, { name: 'Premium Templates', href: '#premium-templates' }, { name: 'Admin Dashboards', href: '#admin-dashboards' }, { name: 'Landing Pages', href: '#landing-pages' }, { title: 'Categories' }, { name: 'E-commerce', href: '#ecommerce' }, { name: 'SaaS Dashboards', href: '#saas-dashboards' }, { name: 'Analytics', href: '#analytics' }, { name: 'Authentication', href: '#authentication' }, { title: 'Resources' }, { name: 'Documentation', href: '#docs' }, { name: 'Component Showcase', href: '#showcase' }, { name: 'GitHub Repository', href: '#github' }, { name: 'Design System', href: '#design-system' } ] // Smooth scroll function const smoothScrollTo = (targetId: string) => { if (targetId.startsWith('#')) { const element = document.querySelector(targetId) if (element) { element.scrollIntoView({ behavior: 'smooth', block: 'start', }) } } } export function LandingNavbar() { const [isOpen, setIsOpen] = useState(false) const [solutionsOpen, setSolutionsOpen] = useState(false) const { setTheme, theme } = useTheme() return (
{/* Logo */}
ShadcnStore
{/* Desktop Navigation */} {navigationItems.map((item) => ( {item.hasMegaMenu ? ( <> {item.name} ) : ( { e.preventDefault() if (item.href.startsWith('#')) { smoothScrollTo(item.href) } else { window.location.href = item.href } }} > {item.name} )} ))} {/* Desktop CTA */}
{/* Mobile Menu */}
{/* Header */}
ShadcnStore
{/* Navigation Links */} {/* Footer Actions */}
{/* Primary Actions */}
) }