import { useState } from 'react'; interface Props { locale: string; dashboard: { brandName: string; navHome: string; navStore: string; navDivination: string; navManual: string; navAuto: string; navHistory: string; navLanguage: string; navSettings: string; logout: string }; history: { title: string; statTotal: string; statFollow: string; statLatest: string; filters: string; filterAll: string; filterCareer: string; filterLove: string; filterWealth: string; noResults: string }; } const MOCK_HISTORY = [ { id: 1, question: '今年转岗是否合适?', date: '2025-05-08', category: '事业', hexagram: '天雷无妄', rating: '上上签', followUp: false }, { id: 2, question: '最近感情是否能推进?', date: '2025-05-07', category: '感情', hexagram: '泽火革', rating: '中上签', followUp: true }, { id: 3, question: '投资理财近期运势如何?', date: '2025-05-05', category: '财富', hexagram: '水地比', rating: '中签', followUp: false }, { id: 4, question: '学业考试能否顺利通过?', date: '2025-05-03', category: '学业', hexagram: '山火贲', rating: '上签', followUp: true }, ]; const CATEGORY_COLORS: Record = { '事业': 'bg-blue-50 text-blue-500', '感情': 'bg-pink-50 text-pink-500', '财富': 'bg-amber-50 text-amber-600', '学业': 'bg-green-50 text-green-600', }; export default function HistoryListPage({ locale, history: h }: Props) { const [selectedId, setSelectedId] = useState(1); const [filter, setFilter] = useState('all'); const filters = [ { id: 'all', label: h.filterAll }, { id: 'career', label: h.filterCareer }, { id: 'love', label: h.filterLove }, { id: 'wealth', label: h.filterWealth }, ]; return (
{/* Stats */}
{[{ label: h.statTotal, value: '12' }, { label: h.statFollow, value: '3' }, { label: h.statLatest, value: '5/8' }].map((stat, i) => (

{stat.label}

{stat.value}

))}
{/* Main: List + Filters */}

{h.title}

{MOCK_HISTORY.map(item => ( { e.preventDefault(); setSelectedId(item.id); }} className={`flex items-center gap-3.5 rounded-xl p-4 cursor-pointer transition-colors border ${selectedId === item.id ? 'bg-violet-50 border-violet-400' : 'bg-white border-slate-200 hover:bg-slate-50'}`}>

{item.question}

{item.category} {item.hexagram}
{item.date}
))}
{/* Side: Filters */}

{h.filters}

{filters.map(f => ( ))}
); }