"use client"; import { FileTextIcon, GemIcon, ImageIcon, MessageSquareIcon, SparklesIcon, SwordIcon, UsersIcon } from "lucide-react"; import Link from "next/link"; import type { MouseEvent } from "react"; import { AddExtraButton } from "@/components/admin/guide-extra-controls"; import { ScrollableNav } from "@/components/public/scrollable-nav"; import { cn } from "@/lib/utils"; const sections = [ { slug: "weapon", label: "Weapons", icon: SwordIcon }, { slug: "artifact", label: "Artifacts & Stats", icon: GemIcon }, { slug: "constellations", label: "Constellations", icon: SparklesIcon }, { slug: "team", label: "Team Calc", icon: UsersIcon }, ] as const; export function GuideSectionNav({ guideId, characterKey, current, extras, }: { guideId: string; characterKey: string; current: string; extras: Array<{ id: string; slug: string; title: string }>; }) { const confirmNavigation = (event: MouseEvent) => { const browserWindow = window as Window & { __guideHasUnsavedChanges?: boolean }; if (typeof window !== "undefined" && browserWindow.__guideHasUnsavedChanges && !window.confirm("ข้อมูลยังบันทึกไม่เสร็จหรือไม่ถูกต้อง ต้องการออกจากหน้านี้หรือไม่?")) { event.preventDefault(); Object.assign(event.nativeEvent, { pageProgressCancelled: true }); } }; return ( ); }