'use client' import { masteryTopicRoute } from '@/lib/learning-routes' import Link from 'next/link' import { useTranslation } from 'react-i18next' import { CircleCheck, Route } from 'lucide-react' import type { MasteryTopic } from '@/lib/learning-api' import { topicDisplayName } from './format' import { LearningCardContent } from '@/components/learning/LearningCard' export function TopicMapCard({ topic }: { topic: MasteryTopic }) { const { t } = useTranslation() const { map, metadata } = topic const total = map.counts.total const mastered = map.counts.mastered const progress = total ? mastered / total : 0 const displayName = topicDisplayName(topic, t) return (