"use client"; import Image from "next/image"; import Link from "next/link"; import type { MouseEvent } from "react"; import { ScrollableNav } from "@/components/public/scrollable-nav"; import { navigationIconPath } from "@/lib/navigation"; import { cn } from "@/lib/utils"; const sections = [ { slug: "weapon", label: "Weapons" }, { slug: "artifact", label: "Artifacts & Stats" }, { slug: "constellations", label: "Constellations" }, { slug: "team", label: "Team Calc" }, { slug: "extra", label: "Extra" }, ] as const; export function GuideSectionNav({ characterKey, current, }: { characterKey: string; current: "overview" | (typeof sections)[number]["slug"]; }) { const confirmNavigation = (event: MouseEvent) => { const browserWindow = window as Window & { __guideHasUnsavedChanges?: boolean }; if (typeof window !== "undefined" && browserWindow.__guideHasUnsavedChanges && !window.confirm("ข้อมูลยังบันทึกไม่เสร็จหรือไม่ถูกต้อง ต้องการออกจากหน้านี้หรือไม่?")) { event.preventDefault(); } }; return ( Overview {sections.map((section) => { const iconPath = navigationIconPath(section.slug); return ( {iconPath ? : null} {section.label} ); })} ); }