"use client"; import { Icon } from "@iconify/react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useState } from "react"; import { Avatar, AvatarFallback, AvatarImage, Separator } from "poyraz-ui/atoms"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger, } from "poyraz-ui/molecules"; import { SearchCommand } from "@/components/search-command"; import { useKeyboardShortcutLabel } from "@/lib/use-keyboard-shortcut-label"; import { NAV_LINKS, SOCIAL_LINKS } from "@/lib/links"; const TOP_ICON_LINKS = [ { id: "ui-kit", label: "UI Kit", href: "https://ui.poyrazavsever.com", icon: "mdi:palette-swatch-outline", external: true, }, { id: "52-weeks-js", label: "52 Weeks of JS", href: "https://js.poyrazavsever.com", icon: "mdi:code-json", external: true, }, { id: "rss", label: "RSS", href: "/rss.xml", icon: "mdi:rss", external: false, }, { id: "cv", label: "Özgeçmiş", href: "/resume.pdf", icon: "mdi:file-account-outline", external: false, }, ] as const; function getNavLinkClass(isActive: boolean) { return [ "inline-flex border-b-2 pb-1 text-sm transition-colors", isActive ? "border-red-600 text-foreground" : "border-transparent text-foreground/55 hover:text-foreground", ].join(" "); } export function SiteNavbar() { const pathname = usePathname(); const [searchOpen, setSearchOpen] = useState(false); const shortcut = useKeyboardShortcutLabel(); const isActiveLink = (href: string) => { if (href === "/") return pathname === "/"; return pathname === href || pathname.startsWith(`${href}/`); }; return (