"use client";
import { Menu, X } from "lucide-react";
import Image from "next/image";
import Link from "next/link";
import { useLocale, useTranslations } from "next-intl";
import { useState } from "react";
import { Container } from "@/components/layout/container";
import { LocaleToggle } from "@/components/layout/locale-toggle";
import { ThemeToggle } from "@/components/theme-toggle";
import { Button } from "@/components/ui/button";
import { getLocalizedPath } from "@/lib/locale";
const navItems = [
{ key: "home", path: "" },
{ key: "portfolio", path: "/portfolio" },
{ key: "products", path: "/products" },
{ key: "about", path: "/about" },
{ key: "contact", path: "/contact" },
];
type SiteHeaderProps = {
isAdmin?: boolean;
};
function NavLinks({
isAdmin,
onNavigate,
}: {
isAdmin: boolean;
onNavigate?: () => void;
}) {
const locale = useLocale();
const t = useTranslations("navigation");
return (
<>
{navItems.map((item) => (
{t(item.key)}
))}
{isAdmin ? (
{t("root")}
) : null}
>
);
}
export function SiteHeader({ isAdmin = false }: SiteHeaderProps) {
const [isOpen, setIsOpen] = useState(false);
const locale = useLocale();
const t = useTranslations("navigation");
return (
{isOpen ? (
) : null}
);
}