import Link from 'next/link';
import Image from 'next/image';
import { useTranslations, useLocale } from 'next-intl';

export default function Header() {
  const t = useTranslations('Navigation');
  const locale = useLocale();

  const menuItems = [
    { label: t('home'), href: '/' },
    { label: t('team'), href: '/team' },
    { label: t('products'), href: '/products' }, // This might need a dropdown
    { label: t('blog'), href: '/blog' },
    { label: t('contact'), href: '/contact' },
  ];

  return (
    <header className="bg-white shadow-sm sticky top-0 z-50">
      <div className="container mx-auto px-4 h-20 flex items-center justify-between">
        <Link href="/" className="flex-shrink-0">
          {/* Use local logo if available, or text for now */}
          <span className="text-2xl font-bold text-primary">KLZ Cables</span>
        </Link>

        <nav className="hidden md:flex items-center space-x-8">
          {menuItems.map((item) => (
            <Link 
              key={item.href} 
              href={`/${locale}${item.href}`}
              className="text-text-primary hover:text-primary font-medium transition-colors"
            >
              {item.label}
            </Link>
          ))}
        </nav>

        <div className="flex items-center space-x-4">
          <div className="flex items-center space-x-2 text-sm font-medium">
            <Link href="/en" className={`hover:text-primary ${locale === 'en' ? 'text-primary' : 'text-text-secondary'}`}>EN</Link>
            <span className="text-text-light">|</span>
            <Link href="/de" className={`hover:text-primary ${locale === 'de' ? 'text-primary' : 'text-text-secondary'}`}>DE</Link>
          </div>
          
          {/* Mobile Menu Button (Placeholder) */}
          <button className="md:hidden p-2 text-text-primary">
            <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
              <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
            </svg>
          </button>
        </div>
      </div>
    </header>
  );
}
