'use client'; import React, { useState, useEffect } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { Menu, X, Smartphone, Layers, Sparkles } from 'lucide-react'; import { SiteConfig, resolveLocalised } from '@/types'; import { BrandLogo } from './BrandLogo'; interface NavbarProps { config: SiteConfig; currentLocale: string; } export function Navbar({ config, currentLocale }: NavbarProps) { const [isScrolled, setIsScrolled] = useState(false); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const pathname = usePathname(); useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 20); }; window.addEventListener('scroll', handleScroll, { passive: true }); return () => window.removeEventListener('scroll', handleScroll); }, []); return (
{/* Bespoke CRE Innovations Vector Brand Logo */} {/* Center Navigation Links (Floating Glass Pill on Desktop) */} {/* Right Status & Action Items */}
{/* Primary CTA Button */} {resolveLocalised(config.nav.cta.label, currentLocale)}
{/* Mobile menu trigger */}
{/* Mobile Drawer */} {mobileMenuOpen && (
Core v2.4 Active
RAM Streaming
{config.nav.header.map((item) => { const active = pathname === item.href; return ( setMobileMenuOpen(false)} className={`flex items-center justify-between px-4 py-3 rounded-xl text-sm font-semibold transition-colors ${ active ? 'text-blue-700 bg-blue-50 border border-blue-200' : 'text-slate-700 hover:bg-slate-100' }`} > {resolveLocalised(item.label, currentLocale)} ); })} setMobileMenuOpen(false)} className="flex items-center justify-between px-4 py-3 rounded-xl text-sm font-semibold text-blue-700 bg-blue-50/60 hover:bg-blue-100/60" > Creative Suite
setMobileMenuOpen(false)} className="flex items-center justify-center gap-2 w-full py-3.5 rounded-xl text-sm font-bold text-white bg-gradient-to-r from-blue-600 to-indigo-600 shadow-md shadow-blue-500/20" > {resolveLocalised(config.nav.cta.label, currentLocale)}
)}
); }