import React from 'react' import type { Flashcard } from '@/lib/services/flashcards' import { getPartOfSpeechDisplay, getCEFRColor } from '@/lib/utils/flashcardUtils' import { TTSButton } from '@/components/shared/TTSButton' interface FlashcardDetailHeaderProps { flashcard: Flashcard isPlayingWord: boolean isPlayingExample: boolean onToggleWordTTS: (text: string, lang?: string) => void } export const FlashcardDetailHeader: React.FC = ({ flashcard, isPlayingWord, isPlayingExample, onToggleWordTTS }) => { return (

{flashcard.word}

{getPartOfSpeechDisplay(flashcard.partOfSpeech)} {flashcard.pronunciation} {/* TTS播放按鈕 - 使用新的TTSButton組件 */}
{/* 學習統計 */}
{flashcard.masteryLevel}%
掌握程度
{flashcard.timesReviewed}
複習次數
{Math.ceil((new Date(flashcard.nextReviewDate).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24))}
天後複習
) }