import { ExhibitOverlay, GuideSteps, GuideStepsItem, Image, Title, StudyGuideModal, } from '@/components' import { useNavigate, useParams } from 'react-router-dom' import { getBackgroundImage, getPublicPath, getStaticImage } from '@/lib/utils' import { useState } from 'react' import Cursor from '@/components/cursor' import { usePuzzleAnimation } from '@/contexts/PuzzleAnimationContext' import { useHuangyanpeiStore, saveHuangyanpeiStore } from '@/store/huangyanpeiStore' // starName 固定为 huangyanpei const starName = 'huangyanpei' // 展品 ID 与资源路径映射,ID 用来做唯一标识 const exhibitSrcMap: Record<1, string> = { 1: 'huangyanpei/place1/3_003', } const HuangyanpeiPlace1 = () => { const navigate = useNavigate() const { moduleName } = useParams<{ moduleName: string }>() const { triggerPuzzleAnimation } = usePuzzleAnimation() // 学习引导弹窗 const [showGuideModal, setShowGuideModal] = useState(true) // 温馨提示弹窗 const [showAfterDialogGuide, setShowAfterDialogGuide] = useState(false) // 温馨提示关闭后的引导对话显示状态 const [visible, setVisible] = useState(false) // 当前激活的展品 ID(只存 ID,不直接存路径,便于作为唯一标识) const [activeExhibitId, setActiveExhibitId] = useState<1 | null>(null) // 使用持久化的访问状态 const place = 'place1' const { markExhibitVisited, getVisitedExhibits, setLastVisitedPlace } = useHuangyanpeiStore() // 从 store 获取已访问的展品,转换为 Set 用于兼容现有代码 const visitedExhibits = getVisitedExhibits(place) const visited = new Set(visitedExhibits) const handleOpenExhibit = (index: 1 | null) => { setActiveExhibitId(index) } const progressCount = visited.size const total = 1 const completed = progressCount >= total const subtitle = completed ? '已完成' : `${progressCount}/${total}` const subtitleClassName = completed ? 'text-[#fff998] [text-shadow:_0_8px_8px_rgba(0,0,0,0.35),_0_0_16px_rgba(0,0,0,0.25)]' : undefined return (